jekyll-theme-chirpy-customized-by-alazaroc 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +106 -0
  4. data/_data/assets/cross_origin.yml +62 -0
  5. data/_data/assets/self_host.yml +51 -0
  6. data/_data/authors.yml +17 -0
  7. data/_data/contact.yml +30 -0
  8. data/_data/locales/ar.yml +93 -0
  9. data/_data/locales/bg-BG.yml +83 -0
  10. data/_data/locales/cs-CZ.yml +91 -0
  11. data/_data/locales/de-DE.yml +82 -0
  12. data/_data/locales/en.yml +93 -0
  13. data/_data/locales/es-ES.yml +79 -0
  14. data/_data/locales/fi-FI.yml +92 -0
  15. data/_data/locales/fr-FR.yml +79 -0
  16. data/_data/locales/hu-HU.yml +81 -0
  17. data/_data/locales/id-ID.yml +79 -0
  18. data/_data/locales/it-IT.yml +93 -0
  19. data/_data/locales/ko-KR.yml +86 -0
  20. data/_data/locales/my-MM.yml +79 -0
  21. data/_data/locales/pt-BR.yml +79 -0
  22. data/_data/locales/ru-RU.yml +79 -0
  23. data/_data/locales/tr-TR.yml +79 -0
  24. data/_data/locales/uk-UA.yml +79 -0
  25. data/_data/locales/vi-VN.yml +77 -0
  26. data/_data/locales/zh-CN.yml +85 -0
  27. data/_data/share.yml +27 -0
  28. data/_includes/assets-origin.html +12 -0
  29. data/_includes/comments/disqus.html +54 -0
  30. data/_includes/comments/giscus.html +56 -0
  31. data/_includes/comments/utterances.html +51 -0
  32. data/_includes/comments.html +5 -0
  33. data/_includes/datetime.html +15 -0
  34. data/_includes/embed/twitch.html +4 -0
  35. data/_includes/embed/youtube.html +6 -0
  36. data/_includes/favicons.html +17 -0
  37. data/_includes/footer.html +36 -0
  38. data/_includes/google-analytics.html +14 -0
  39. data/_includes/head.html +115 -0
  40. data/_includes/js-selector.html +99 -0
  41. data/_includes/jsdelivr-combine.html +32 -0
  42. data/_includes/language-alias.html +70 -0
  43. data/_includes/mermaid.html +59 -0
  44. data/_includes/mode-toggle.html +129 -0
  45. data/_includes/no-linenos.html +10 -0
  46. data/_includes/post-nav.html +30 -0
  47. data/_includes/post-paginator.html +88 -0
  48. data/_includes/post-sharing.html +27 -0
  49. data/_includes/read-time.html +30 -0
  50. data/_includes/refactor-content.html +330 -0
  51. data/_includes/related-posts.html +103 -0
  52. data/_includes/search-loader.html +46 -0
  53. data/_includes/search-results.html +11 -0
  54. data/_includes/sidebar.html +103 -0
  55. data/_includes/toc.html +16 -0
  56. data/_includes/topbar.html +70 -0
  57. data/_includes/trending-tags.html +50 -0
  58. data/_includes/update-list.html +40 -0
  59. data/_layouts/archives.html +34 -0
  60. data/_layouts/categories.html +118 -0
  61. data/_layouts/category.html +22 -0
  62. data/_layouts/compress.html +10 -0
  63. data/_layouts/default.html +71 -0
  64. data/_layouts/home.html +94 -0
  65. data/_layouts/page.html +63 -0
  66. data/_layouts/post.html +141 -0
  67. data/_layouts/tag.html +21 -0
  68. data/_layouts/tags.html +23 -0
  69. data/_sass/addon/commons.scss +1740 -0
  70. data/_sass/addon/module.scss +163 -0
  71. data/_sass/addon/syntax.scss +275 -0
  72. data/_sass/addon/variables.scss +30 -0
  73. data/_sass/colors/dark-syntax.scss +87 -0
  74. data/_sass/colors/dark-typography.scss +170 -0
  75. data/_sass/colors/light-syntax.scss +83 -0
  76. data/_sass/colors/light-typography.scss +104 -0
  77. data/_sass/jekyll-theme-chirpy-customized-by-alazaroc.scss +24 -0
  78. data/_sass/layout/archives.scss +136 -0
  79. data/_sass/layout/categories.scss +66 -0
  80. data/_sass/layout/category-tag.scss +73 -0
  81. data/_sass/layout/home.scss +178 -0
  82. data/_sass/layout/post.scss +387 -0
  83. data/_sass/layout/tags.scss +19 -0
  84. data/_sass/variables-hook.scss +3 -0
  85. data/assets/404.html +14 -0
  86. data/assets/css/style.scss +12 -0
  87. data/assets/feed.xml +61 -0
  88. data/assets/img/favicons/android-chrome-192x192.png +0 -0
  89. data/assets/img/favicons/android-chrome-512x512.png +0 -0
  90. data/assets/img/favicons/apple-touch-icon.png +0 -0
  91. data/assets/img/favicons/browserconfig.xml +13 -0
  92. data/assets/img/favicons/favicon-16x16.png +0 -0
  93. data/assets/img/favicons/favicon-32x32.png +0 -0
  94. data/assets/img/favicons/favicon.ico +0 -0
  95. data/assets/img/favicons/mstile-150x150.png +0 -0
  96. data/assets/img/favicons/site.webmanifest +26 -0
  97. data/assets/js/data/search.json +20 -0
  98. data/assets/js/data/swcache.js +54 -0
  99. data/assets/js/dist/categories.min.js +6 -0
  100. data/assets/js/dist/commons.min.js +6 -0
  101. data/assets/js/dist/home.min.js +6 -0
  102. data/assets/js/dist/misc.min.js +6 -0
  103. data/assets/js/dist/page.min.js +6 -0
  104. data/assets/js/dist/post.min.js +6 -0
  105. data/assets/js/dist/pvreport.min.js +6 -0
  106. data/assets/js/pwa/app.js +47 -0
  107. data/assets/js/pwa/sw.js +90 -0
  108. data/assets/js/pwa/unregister.js +12 -0
  109. data/assets/robots.txt +10 -0
  110. metadata +242 -0
@@ -0,0 +1,56 @@
1
+ <!-- https://giscus.app/ -->
2
+ <script type="text/javascript">
3
+ $(function () {
4
+ const origin = "https://giscus.app";
5
+ const iframe = "iframe.giscus-frame";
6
+ const lightTheme = "light";
7
+ const darkTheme = "dark_dimmed";
8
+ let initTheme = lightTheme;
9
+
10
+ if ($("html[data-mode=dark]").length > 0
11
+ || ($("html[data-mode]").length == 0
12
+ && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
13
+ initTheme = darkTheme;
14
+ }
15
+
16
+ let giscusAttributes = {
17
+ "src": "https://giscus.app/client.js",
18
+ "data-repo": "{{ site.comments.giscus.repo}}",
19
+ "data-repo-id": "{{ site.comments.giscus.repo_id }}",
20
+ "data-category": "{{ site.comments.giscus.category }}",
21
+ "data-category-id": "{{ site.comments.giscus.category_id }}",
22
+ "data-mapping": "{{ site.comments.giscus.mapping | default: 'pathname' }}",
23
+ "data-reactions-enabled": "{{ site.comments.giscus.reactions_enabled | default: '1' }}",
24
+ "data-emit-metadata": "0",
25
+ "data-theme": initTheme,
26
+ "data-input-position": "{{ site.comments.giscus.input_position | default: 'bottom' }}",
27
+ "data-lang": "{{ site.comments.giscus.lang | default: lang }}",
28
+ "crossorigin": "anonymous",
29
+ "async": ""
30
+ };
31
+
32
+ let giscusScript = document.createElement("script");
33
+ Object.entries(giscusAttributes).forEach(([key, value]) => giscusScript.setAttribute(key, value));
34
+ document.getElementById("tail-wrapper").appendChild(giscusScript);
35
+
36
+ addEventListener("message", (event) => {
37
+ if (event.source === window && event.data &&
38
+ event.data.direction === ModeToggle.ID) {
39
+ /* global theme mode changed */
40
+ const mode = event.data.message;
41
+ const theme = (mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme);
42
+
43
+ const message = {
44
+ setConfig: {
45
+ theme: theme
46
+ }
47
+ };
48
+
49
+ const giscus = document.querySelector(iframe).contentWindow;
50
+ giscus.postMessage({ giscus: message }, origin);
51
+ }
52
+
53
+ });
54
+
55
+ });
56
+ </script>
@@ -0,0 +1,51 @@
1
+ <!-- https://utteranc.es/ -->
2
+ <script src="https://utteranc.es/client.js"
3
+ repo="{{ site.comments.utterances.repo }}"
4
+ issue-term="{{ site.comments.utterances.issue_term }}"
5
+ crossorigin="anonymous"
6
+ async>
7
+ </script>
8
+
9
+ <script type="text/javascript">
10
+ $(function() {
11
+ const origin = "https://utteranc.es";
12
+ const iframe = "iframe.utterances-frame";
13
+ const lightTheme = "github-light";
14
+ const darkTheme = "github-dark";
15
+ let initTheme = lightTheme;
16
+
17
+ if ($("html[data-mode=dark]").length > 0
18
+ || ($("html[data-mode]").length == 0
19
+ && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
20
+ initTheme = darkTheme;
21
+ }
22
+
23
+ addEventListener("message", (event) => {
24
+ let theme;
25
+
26
+ /* credit to <https://github.com/utterance/utterances/issues/170#issuecomment-594036347> */
27
+ if (event.origin === origin) {
28
+ /* page initial */
29
+ theme = initTheme;
30
+
31
+ } else if (event.source === window && event.data &&
32
+ event.data.direction === ModeToggle.ID) {
33
+ /* global theme mode changed */
34
+ const mode = event.data.message;
35
+ theme = (mode === ModeToggle.DARK_MODE ? darkTheme : lightTheme);
36
+
37
+ } else {
38
+ return;
39
+ }
40
+
41
+ const message = {
42
+ type: "set-theme",
43
+ theme: theme
44
+ };
45
+
46
+ const utterances = document.querySelector(iframe).contentWindow;
47
+ utterances.postMessage(message, origin);
48
+ });
49
+
50
+ });
51
+ </script>
@@ -0,0 +1,5 @@
1
+ <!-- The comments switcher -->
2
+ {% if page.comments and site.comments.active %}
3
+ {% capture path %}comments/{{ site.comments.active }}.html{% endcapture %}
4
+ {% include {{ path }} %}
5
+ {% endif %}
@@ -0,0 +1,15 @@
1
+ <!--
2
+ Date format snippet
3
+ See: ${JS_ROOT}/utils/locale-dateime.js
4
+ -->
5
+
6
+ {% assign wrap_elem = include.wrap | default: 'em' %}
7
+ {% assign df_strftime = site.data.locales[site.lang].df.post.strftime | default: '%d/%m/%Y' %}
8
+ {% assign df_dayjs = site.data.locales[site.lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
9
+
10
+ <{{ wrap_elem }} class="{% if include.class %}{{ include.class }}{% endif %}"
11
+ data-ts="{{ include.date | date: '%s' }}"
12
+ data-df="{{ df_dayjs }}"
13
+ {% if include.tooltip %}data-toggle="tooltip" data-placement="bottom"{% endif %}>
14
+ {{ include.date | date: df_strftime }}
15
+ </{{ wrap_elem }}>
@@ -0,0 +1,4 @@
1
+ <iframe class="embed-video twitch lazyload"
2
+ src="https://player.twitch.tv/?video={{ include.id }}&parent={{ site.url | split: '://' | last | remove: '/' }}"
3
+ frameborder="0" allowfullscreen="true"
4
+ scrolling="no"></iframe>
@@ -0,0 +1,6 @@
1
+ <iframe class="embed-video youtube lazyload"
2
+ src="https://www.youtube.com/embed/{{ include.id }}"
3
+ title="YouTube video player"
4
+ frameborder="0"
5
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
6
+ allowfullscreen></iframe>
@@ -0,0 +1,17 @@
1
+ <!--
2
+ The Favicons for Web, Android, Microsoft, and iOS (iPhone and iPad) Apps
3
+ Generated by: https://realfavicongenerator.net/
4
+ -->
5
+
6
+ {% capture favicon_path %}{{ '/assets/img/favicons' | relative_url }}{% endcapture %}
7
+
8
+ <link rel="apple-touch-icon" sizes="180x180" href="{{ favicon_path }}/apple-touch-icon.png">
9
+ <link rel="icon" type="image/png" sizes="32x32" href="{{ favicon_path }}/favicon-32x32.png">
10
+ <link rel="icon" type="image/png" sizes="16x16" href="{{ favicon_path }}/favicon-16x16.png">
11
+ <link rel="manifest" href="{{ favicon_path }}/site.webmanifest">
12
+ <link rel="shortcut icon" href="{{ favicon_path }}/favicon.ico">
13
+ <meta name="apple-mobile-web-app-title" content="{{ site.title }}">
14
+ <meta name="application-name" content="{{ site.title }}">
15
+ <meta name="msapplication-TileColor" content="#da532c">
16
+ <meta name="msapplication-config" content="{{ favicon_path }}/browserconfig.xml">
17
+ <meta name="theme-color" content="#ffffff">
@@ -0,0 +1,36 @@
1
+ <!-- The Footer -->
2
+
3
+ <footer>
4
+ <div class="container pl-lg-4 pr-lg-4">
5
+ <div class="d-flex justify-content-between align-items-center text-muted ml-md-3 mr-md-3">
6
+ <div class="footer-left">
7
+ <p class="mb-0">
8
+ © {{ 'now' | date: "%Y" }}
9
+ <a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
10
+ {% if site.data.locales[site.lang].copyright.brief %}
11
+ <span data-toggle="tooltip" data-placement="top"
12
+ title="{{ site.data.locales[site.lang].copyright.verbose }}">{{ site.data.locales[site.lang].copyright.brief }}</span>
13
+ {% endif %}
14
+ </p>
15
+ </div>
16
+
17
+ <div class="footer-right">
18
+ <p class="mb-0">
19
+
20
+ {%- capture _platform -%}
21
+ <a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
22
+ {%- endcapture -%}
23
+
24
+ {%- capture _theme -%}
25
+ <a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
26
+ {%- endcapture -%}
27
+
28
+ {{ site.data.locales[site.lang].meta
29
+ | default: 'Using the :PLATFORM theme :THEME.'
30
+ | replace: ':PLATFORM', _platform | replace: ':THEME', _theme
31
+ }}
32
+ </p>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ </footer>
@@ -0,0 +1,14 @@
1
+ <!--
2
+ The GA snippet
3
+ -->
4
+ <!-- Global site tag (gtag.js) - Google Analytics -->
5
+ <script defer src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics.id }}"></script>
6
+ <script>
7
+ document.addEventListener("DOMContentLoaded", function(event) {
8
+ window.dataLayer = window.dataLayer || [];
9
+ function gtag(){dataLayer.push(arguments);}
10
+
11
+ gtag('js', new Date());
12
+ gtag('config', '{{ site.google_analytics.id }}');
13
+ });
14
+ </script>
@@ -0,0 +1,115 @@
1
+ <!--
2
+ The Head
3
+ -->
4
+
5
+ <head>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
8
+
9
+ {% if page.layout == 'home' or page.layout == 'post' %}
10
+
11
+ {% if site.google_analytics.pv.proxy_endpoint %}
12
+ <meta name="pv-proxy-endpoint" content="{{ site.google_analytics.pv.proxy_endpoint }}">
13
+ {% endif %}
14
+
15
+ {% if site.google_analytics.pv.cache_path %}
16
+ <meta name="pv-cache-path" content="{{ site.google_analytics.pv.cache_path | relative_url }}">
17
+ {% endif %}
18
+
19
+ {% endif %}
20
+
21
+ {% capture seo_tags %}
22
+ {% seo title=false %}
23
+ {% endcapture %}
24
+
25
+ {% if page.image %}
26
+ {% assign img = page.image.path | default: page.image %}
27
+
28
+ {% unless img contains '://' %}
29
+ {% assign img_path = page.img_path | append: '/' | append: img | replace: '//', '/' %}
30
+ {% capture target %}"{{ img | absolute_url }}"{% endcapture %}
31
+
32
+ {% if site.img_cdn contains '//' %}
33
+ <!-- it's a cross-origin URL -->
34
+ {% capture replacement %}"{{ site.img_cdn }}{{ img_path }}"{% endcapture %}
35
+ {% else %}
36
+ <!-- it's a local file path -->
37
+ {%- capture replacement -%}
38
+ "{{ site.img_cdn | append: '/' | append: img_path | replace: '//', '/' | absolute_url }}"
39
+ {%- endcapture -%}
40
+ {% endif %}
41
+
42
+ {% assign seo_tags = seo_tags | replace: target, replacement %}
43
+
44
+ {% endunless %}
45
+
46
+ {% endif %}
47
+
48
+ {{ seo_tags }}
49
+
50
+ <title>
51
+ {%- unless page.layout == "home" -%}
52
+ {{ page.title | append: " | "}}
53
+ {%- endunless -%}
54
+ {{ site.title }}
55
+ </title>
56
+
57
+ {% include favicons.html %}
58
+
59
+ {% if site.resources.ignore_env != jekyll.environment and site.resources.self_hosted %}
60
+
61
+ <link href="{{ site.data.assets[origin].webfonts | relative_url }}" rel="stylesheet">
62
+
63
+ {% else %}
64
+
65
+ {% for cdn in site.data.assets[origin].cdns %}
66
+ <link rel="preconnect" href="{{ cdn.url }}" {{ cdn.args }}>
67
+ <link rel="dns-prefetch" href="{{ cdn.url }}" {{ cdn.args }}>
68
+ {% endfor %}
69
+
70
+ <link rel="stylesheet" href="{{ site.data.assets[origin].webfonts | relative_url }}">
71
+
72
+ {% endif %}
73
+
74
+ <!-- GA -->
75
+ {% if jekyll.environment == 'production'
76
+ and site.google_analytics.id != empty and site.google_analytics.id %}
77
+ <link rel="preconnect" href="https://www.google-analytics.com" crossorigin="use-credentials">
78
+ <link rel="dns-prefetch" href="https://www.google-analytics.com">
79
+
80
+ <link rel="preconnect" href="https://www.googletagmanager.com" crossorigin="anonymous">
81
+ <link rel="dns-prefetch" href="https://www.googletagmanager.com">
82
+
83
+ {% if site.google_analytics.pv.proxy_endpoint %}
84
+ {% assign proxy_url = site.google_analytics.pv.proxy_endpoint
85
+ | replace: "https://", "" | split: "/" | first | prepend: "https://" %}
86
+ <link rel="preconnect" href="{{ proxy_url }}" crossorigin="use-credentials">
87
+ <link rel="dns-prefetch" href="{{ proxy_url }}">
88
+ {% endif %}
89
+ {% endif %}
90
+
91
+ <!-- Bootstrap -->
92
+ <link rel="stylesheet" href="{{ site.data.assets[origin].bootstrap.css | relative_url}}">
93
+
94
+ <!-- Font Awesome -->
95
+ <link rel="stylesheet" href="{{ site.data.assets[origin].fontawesome.css | relative_url }}">
96
+
97
+ <link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
98
+
99
+ {% if site.toc and page.toc %}
100
+ <link rel="stylesheet" href="{{ site.data.assets[origin].bootstrap-toc.css | relative_url }}">
101
+ {% endif %}
102
+
103
+ {% if page.layout == 'page' or page.layout == 'post' %}
104
+ <!-- Manific Popup -->
105
+ <link rel="stylesheet" href="{{ site.data.assets[origin].magnific-popup.css | relative_url }}">
106
+ {% endif %}
107
+
108
+ <!-- JavaScript -->
109
+
110
+ <script src="{{ site.data.assets[origin].jquery.js | relative_url }}"></script>
111
+
112
+ {% unless site.theme_mode %}
113
+ {% include mode-toggle.html %}
114
+ {% endunless %}
115
+ </head>
@@ -0,0 +1,99 @@
1
+ <!--
2
+ JS selector for site.
3
+ -->
4
+
5
+ <!-- layout specified -->
6
+
7
+ {% if page.layout == 'post' %}
8
+ {% if site.google_analytics.pv.proxy_endpoint or site.google_analytics.pv.cache_path %}
9
+ <!-- pv-report needs countup.js -->
10
+ <script async src="{{ site.data.assets[origin].countup.js | relative_url }}"></script>
11
+ <script defer src="{{ '/assets/js/dist/pvreport.min.js' | relative_url }}"></script>
12
+ {% endif %}
13
+ {% endif %}
14
+
15
+ {% if page.layout == 'post' or page.layout == 'page' %}
16
+ <!-- image lazy-loading & popup & clipboard -->
17
+ {% assign _urls = site.data.assets[origin].magnific-popup.js
18
+ | append: ',' | append: site.data.assets[origin].lazysizes.js
19
+ | append: ',' | append: site.data.assets[origin].clipboard.js
20
+ %}
21
+
22
+ {% include jsdelivr-combine.html urls=_urls %}
23
+ {% endif %}
24
+
25
+ {% if page.layout == 'home'
26
+ or page.layout == 'post'
27
+ or page.layout == 'archives'
28
+ or page.layout == 'category'
29
+ or page.layout == 'tag' %}
30
+
31
+ {% assign locale = site.lang | split: '-' | first %}
32
+
33
+ {% assign _urls = site.data.assets[origin].dayjs.js.common
34
+ | append: ',' | append: site.data.assets[origin].dayjs.js.locale
35
+ | replace: ':LOCALE', locale
36
+ | append: ',' | append: site.data.assets[origin].dayjs.js.relativeTime
37
+ | append: ',' | append: site.data.assets[origin].dayjs.js.localizedFormat
38
+ %}
39
+
40
+ {% include jsdelivr-combine.html urls=_urls %}
41
+
42
+ {% endif %}
43
+
44
+ {% if page.layout == 'home'
45
+ or page.layout == 'categories'
46
+ or page.layout == 'post'
47
+ or page.layout == 'page' %}
48
+ {% assign type = page.layout %}
49
+ {% elsif page.layout == 'archives'
50
+ or page.layout == 'category'
51
+ or page.layout == 'tag' %}
52
+ {% assign type = "misc" %}
53
+ {% else %}
54
+ {% assign type = "commons" %}
55
+ {% endif %}
56
+
57
+ {% capture script %}/assets/js/dist/{{ type }}.min.js{% endcapture %}
58
+ <script defer src="{{ script | relative_url }}"></script>
59
+
60
+ {% if page.math %}
61
+ <!-- MathJax -->
62
+ <script>
63
+ /* see: <https://docs.mathjax.org/en/latest/options/input/tex.html#tex-options> */
64
+ MathJax = {
65
+ tex: {
66
+ inlineMath: [ /* start/end delimiter pairs for in-line math */
67
+ ['$','$'],
68
+ ['\\(','\\)']
69
+ ],
70
+ displayMath: [ /* start/end delimiter pairs for display math */
71
+ ['$$', '$$'],
72
+ ['\\[', '\\]']
73
+ ]
74
+ }
75
+ };
76
+ </script>
77
+ <script src="{{ site.data.assets[origin].polyfill.js | relative_url }}"></script>
78
+ <script id="MathJax-script" async src="{{ site.data.assets[origin].mathjax.js | relative_url }}">
79
+ </script>
80
+ {% endif %}
81
+
82
+ <!-- commons -->
83
+
84
+ <script src="{{ site.data.assets[origin].bootstrap.js | relative_url }}"></script>
85
+
86
+ {% if jekyll.environment == 'production' %}
87
+ <!-- PWA -->
88
+ {% if site.pwa.enabled %}
89
+ <script defer src="{{ '/app.js' | relative_url }}"></script>
90
+ {% else %}
91
+ <script defer src="{{ '/unregister.js' | relative_url }}"></script>
92
+ {% endif %}
93
+
94
+ <!-- GA -->
95
+ {% if site.google_analytics.id != empty and site.google_analytics.id %}
96
+ {% include google-analytics.html %}
97
+ {% endif %}
98
+
99
+ {% endif %}
@@ -0,0 +1,32 @@
1
+ {% assign urls = include.urls | split: ',' %}
2
+
3
+ {% assign combined_urls = nil %}
4
+
5
+ {% assign domain = 'https://cdn.jsdelivr.net/' %}
6
+
7
+ {% for url in urls %}
8
+
9
+ {% if url contains domain %}
10
+ {% assign url_snippet = url | slice: domain.size, url.size %}
11
+
12
+ {% if combined_urls %}
13
+ {% assign combined_urls = combined_urls | append: ',' | append: url_snippet %}
14
+ {% else %}
15
+ {% assign combined_urls = domain | append: 'combine/' | append: url_snippet %}
16
+ {% endif %}
17
+
18
+ {% elsif url contains '//' %}
19
+
20
+ <script src="{{ url }}"></script>
21
+
22
+ {% else %}
23
+
24
+ <script src="{{ url | relative_url }}"></script>
25
+
26
+ {% endif %}
27
+
28
+ {% endfor %}
29
+
30
+ {% if combined_urls %}
31
+ <script src="{{ combined_urls }}"></script>
32
+ {% endif %}
@@ -0,0 +1,70 @@
1
+ {% comment %}
2
+
3
+ Convert the alias of the syntax language to the official name
4
+
5
+ See: <https://github.com/rouge-ruby/rouge/wiki/List-of-supported-languages-and-lexers>
6
+
7
+ {% endcomment %}
8
+
9
+ {% assign _lang = include.language | default: '' %}
10
+
11
+ {% case _lang %}
12
+ {% when 'actionscript', 'as', 'as3' %}
13
+ {{ 'ActionScript' }}
14
+ {% when 'applescript' %}
15
+ {{ 'AppleScript' }}
16
+ {% when 'brightscript', 'bs', 'brs' %}
17
+ {{ 'BrightScript' }}
18
+ {% when 'cfscript', 'cfc' %}
19
+ {{ 'CFScript' }}
20
+ {% when 'coffeescript', 'coffee', 'coffee-script' %}
21
+ {{ 'CoffeeScript' }}
22
+ {% when 'cs', 'csharp' %}
23
+ {{ 'C#' }}
24
+ {% when 'erl' %}
25
+ {{ 'Erlang' }}
26
+ {% when 'graphql' %}
27
+ {{ 'GraphQL' }}
28
+ {% when 'haskell', 'hs' %}
29
+ {{ 'Haskell' }}
30
+ {% when 'javascript', 'js' %}
31
+ {{ 'JavaScript' }}
32
+ {% when 'make', 'mf', 'gnumake', 'bsdmake' %}
33
+ {{ 'Makefile' }}
34
+ {% when 'md', 'mkd' %}
35
+ {{ 'Markdown' }}
36
+ {% when 'm' %}
37
+ {{ 'Matlab' }}
38
+ {% when 'objective_c', 'objc', 'obj-c', 'obj_c', 'objectivec' %}
39
+ {{ 'Objective-C' }}
40
+ {% when 'perl', 'pl' %}
41
+ {{ 'Perl' }}
42
+ {% when 'php','php3','php4','php5' %}
43
+ {{ 'PHP' }}
44
+ {% when 'py' %}
45
+ {{ 'Python' }}
46
+ {% when 'rb' %}
47
+ {{ 'Ruby' }}
48
+ {% when 'rs','no_run','ignore','should_panic' %}
49
+ {{ 'Rust' }}
50
+ {% when 'bash', 'zsh', 'ksh', 'sh' %}
51
+ {{ 'Shell' }}
52
+ {% when 'st', 'squeak' %}
53
+ {{ 'Smalltalk' }}
54
+ {% when 'tex'%}
55
+ {{ 'TeX' }}
56
+ {% when 'latex' %}
57
+ {{ 'LaTex' }}
58
+ {% when 'ts', 'typescript' %}
59
+ {{ 'TypeScript' }}
60
+ {% when 'vb', 'visualbasic' %}
61
+ {{ 'Visual Basic' }}
62
+ {% when 'vue', 'vuejs' %}
63
+ {{ 'Vue.js' }}
64
+ {% when 'yml' %}
65
+ {{ 'YAML' }}
66
+ {% when 'css', 'html', 'scss', 'ssh', 'toml', 'xml', 'yaml', 'json' %}
67
+ {{ _lang | upcase }}
68
+ {% else %}
69
+ {{ _lang | capitalize }}
70
+ {% endcase %}
@@ -0,0 +1,59 @@
1
+ <!--
2
+ mermaid-js loader
3
+ -->
4
+
5
+ <script src="{{ site.data.assets[origin].mermaid.js | relative_url }}"></script>
6
+
7
+ <script>
8
+ (function () {
9
+
10
+ function updateMermaid(event) {
11
+ if (event.source === window && event.data &&
12
+ event.data.direction === ModeToggle.ID) {
13
+
14
+ const mode = event.data.message;
15
+
16
+ if (typeof mermaid === "undefined") {
17
+ return;
18
+ }
19
+
20
+ let expectedTheme = (mode === ModeToggle.DARK_MODE ? "dark" : "default");
21
+ let config = {theme: expectedTheme};
22
+
23
+ /* Re-render the SVG › <https://github.com/mermaid-js/mermaid/issues/311#issuecomment-332557344> */
24
+ $(".mermaid").each(function () {
25
+ let svgCode = $(this).prev().children().html();
26
+ $(this).removeAttr("data-processed");
27
+ $(this).html(svgCode);
28
+ });
29
+
30
+ mermaid.initialize(config);
31
+ mermaid.init(undefined, ".mermaid");
32
+ }
33
+ }
34
+
35
+ let initTheme = "default";
36
+
37
+ if ($("html[data-mode=dark]").length > 0
38
+ || ($("html[data-mode]").length == 0
39
+ && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
40
+ initTheme = "dark";
41
+ }
42
+
43
+ let mermaidConf = {
44
+ theme: initTheme /* <default|dark|forest|neutral> */
45
+ };
46
+
47
+ /* Create mermaid tag */
48
+ $("pre").has("code.language-mermaid").each(function () {
49
+ let svgCode = $(this).children().html();
50
+ $(this).addClass("unloaded");
51
+ $(this).after(`<pre class=\"mermaid\">${svgCode}</pre>`);
52
+ });
53
+
54
+ mermaid.initialize(mermaidConf);
55
+
56
+ window.addEventListener("message", updateMermaid);
57
+ })();
58
+
59
+ </script>