From d979f023f4fcd98ae627112b07f6cb1a142223ef Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Tue, 9 Apr 2024 19:18:45 +0800 Subject: [PATCH 01/29] add: feature of sass --- assets/css/main.css | 45 ------------------- .../assets/css/custom1.scss | 17 +++++++ .../assets/css/custom2.css | 7 +++ .../assets/css/foundation/_code.scss | 5 +++ .../content/posts/advanced-style.md | 42 +++++++++++++++++ exampleSiteMultilingual/hugo.toml | 2 + layouts/partials/head.html | 23 ++++++++++ 7 files changed, 96 insertions(+), 45 deletions(-) create mode 100644 exampleSiteMultilingual/assets/css/custom1.scss create mode 100644 exampleSiteMultilingual/assets/css/custom2.css create mode 100644 exampleSiteMultilingual/assets/css/foundation/_code.scss create mode 100644 exampleSiteMultilingual/content/posts/advanced-style.md diff --git a/assets/css/main.css b/assets/css/main.css index 24f564c..eb85dcf 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -888,49 +888,4 @@ ul.footer-menu>li { .post-pagination .pagination-item { max-width: 10em; } -} - - { - { - range site.Params.customCSS - } -} - - { - { - $custom : =resources.Get . - } -} - - { - { - $custom.Content - } -} - - { - { - end - } -} - - { - { - if site.Params.isso.enabled - } -} - -#isso-thread .textarea { - color: #000; -} - -#isso-thread .isso-feedlink { - position: relative; - z-index: 1; -} - - { - { - end - } } \ No newline at end of file diff --git a/exampleSiteMultilingual/assets/css/custom1.scss b/exampleSiteMultilingual/assets/css/custom1.scss new file mode 100644 index 0000000..aa327f5 --- /dev/null +++ b/exampleSiteMultilingual/assets/css/custom1.scss @@ -0,0 +1,17 @@ +@import 'foundation/code'; + +$font-stack: Helvetica, sans-serif; +$primary-color: yellow; +$background-color: pink; + +junyi { + font: 100% $font-stack; + color: $primary-color; + background-color: $background-color; +} + +body .container { + max-width: none; + padding-left: 5em; + padding-right: 5em; +} \ No newline at end of file diff --git a/exampleSiteMultilingual/assets/css/custom2.css b/exampleSiteMultilingual/assets/css/custom2.css new file mode 100644 index 0000000..63633d5 --- /dev/null +++ b/exampleSiteMultilingual/assets/css/custom2.css @@ -0,0 +1,7 @@ +.anubis-custom-style { + background-color: pink; + color: black; + padding: 1em; + border-radius: 0.3em; + border: 1px solid black; +} \ No newline at end of file diff --git a/exampleSiteMultilingual/assets/css/foundation/_code.scss b/exampleSiteMultilingual/assets/css/foundation/_code.scss new file mode 100644 index 0000000..5a98919 --- /dev/null +++ b/exampleSiteMultilingual/assets/css/foundation/_code.scss @@ -0,0 +1,5 @@ +code { + padding: .25em; + line-height: 2; + background-color: rgb(189, 204, 255); +} \ No newline at end of file diff --git a/exampleSiteMultilingual/content/posts/advanced-style.md b/exampleSiteMultilingual/content/posts/advanced-style.md new file mode 100644 index 0000000..e09b87f --- /dev/null +++ b/exampleSiteMultilingual/content/posts/advanced-style.md @@ -0,0 +1,42 @@ ++++ +author = "Hugo Authors" +title = "Advanced Style" +date = "2024-04-09" +description = "Guide to advanced usage of Anubis2" +tags = [ + "emoji", +] ++++ + +
+The custom .css .scss .sass file should be placed in assets/ folder. (instead of static/) +
+ +This page is affected by `assets/css/custom1.scss` and `assets/css/custom2.css` + +## How to use PoseCSS + +First, make sure your Hugo version supports Hugo Pipes. Hugo Pipes is available in Hugo `0.46` and later versions. + +Then, add the following content to your Hugo configuration file (such as config.toml) to enable PostCSS: + +```toml +[build] + writeStats = true + +[params] + usePostCSS = true +``` + +In addition, you need to create a postcss.config.js file in the root directory of your project, with the following content: + +```js +module.exports = { + plugins: [ + require('postcss-import')(), + require('postcss-url')(), + require('autoprefixer')(), + // Add more PostCSS plugins here if needed + ] +}; +``` diff --git a/exampleSiteMultilingual/hugo.toml b/exampleSiteMultilingual/hugo.toml index a70f16d..3d1041c 100644 --- a/exampleSiteMultilingual/hugo.toml +++ b/exampleSiteMultilingual/hugo.toml @@ -38,6 +38,8 @@ GiscusCategoryId = "DIC_kwDOLEp76c4CcbPS" GiscusLazyLoad = false GiscusDataMapping = "pathname" +customCSS = ["css/custom1.scss", "css/custom2.css"] + [[params.social]] id = "docs" url = "https://gohugo.io/documentation/" diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a902d73..b5f4bf5 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -54,6 +54,29 @@ {{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/light.css") }} {{ partial "resource.html" (dict "context" . "type" "css" "filename" "css/dark.css") }} + +{{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }} + + +{{ range site.Params.customCSS }} + {{ with resources.Get . | toCSS $opts | minify | fingerprint }} + + {{ end }} +{{ end }} + +{{ if site.Params.isso.enabled }} {{/* TODO: maybe we can remove it */}} + +{{ end }} + + {{ if .Site.Params.copyCodeButton | default true }} {{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/copy-code.js") }} {{ end }} From f774d2689d2e3b48ef7b494f3f7f63ba74a66657 Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Tue, 9 Apr 2024 19:25:48 +0800 Subject: [PATCH 02/29] fix the baseURL --- exampleSiteMultilingual/.gitignore | 2 +- exampleSiteMultilingual/.pre-commit-config.yaml | 11 +++++++++++ exampleSiteMultilingual/hugo.toml | 2 +- exampleSiteMultilingual/netlify.toml | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 exampleSiteMultilingual/.pre-commit-config.yaml diff --git a/exampleSiteMultilingual/.gitignore b/exampleSiteMultilingual/.gitignore index df410c6..21730f3 100644 --- a/exampleSiteMultilingual/.gitignore +++ b/exampleSiteMultilingual/.gitignore @@ -1,3 +1,3 @@ .hugo_build.lock public/ -resources/ \ No newline at end of file +resources/ diff --git a/exampleSiteMultilingual/.pre-commit-config.yaml b/exampleSiteMultilingual/.pre-commit-config.yaml new file mode 100644 index 0000000..3619705 --- /dev/null +++ b/exampleSiteMultilingual/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v3.2.0 + hooks: + - id: trailing-whitespace + # - id: end-of-file-fixer + - id: check-yaml + - id: check-toml + - id: check-added-large-files diff --git a/exampleSiteMultilingual/hugo.toml b/exampleSiteMultilingual/hugo.toml index 3d1041c..cd45a84 100644 --- a/exampleSiteMultilingual/hugo.toml +++ b/exampleSiteMultilingual/hugo.toml @@ -1,4 +1,4 @@ -baseURL = "https://hugo-theme-anubis2.netlify.app/" +baseURL = "/" languageCode = "en-us" defaultContentLanguage = "en" title = "Anubis2" diff --git a/exampleSiteMultilingual/netlify.toml b/exampleSiteMultilingual/netlify.toml index 8b1ea78..d7db734 100644 --- a/exampleSiteMultilingual/netlify.toml +++ b/exampleSiteMultilingual/netlify.toml @@ -5,4 +5,4 @@ command = "hugo --gc --minify" [context.production.environment] HUGO_VERSION = "0.115.4" HUGO_ENV = "production" -HUGO_ENABLEGITINFO = "true" \ No newline at end of file +HUGO_ENABLEGITINFO = "true" From 9f33764cffa4038956c889b658a203939d2cd031 Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Tue, 9 Apr 2024 19:33:28 +0800 Subject: [PATCH 03/29] fix: PermaLink to RelPermalink --- layouts/_default/rss.xml | 8 ++++---- layouts/_default/sitemap.xml | 8 ++++---- layouts/partials/head.html | 4 +--- layouts/partials/language-switcher.html | 2 +- layouts/partials/post-info.html | 8 ++++---- layouts/partials/resource.html | 4 ++-- layouts/partials/social-icons.html | 4 ++-- 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml index cc620f4..15a4ed7 100644 --- a/layouts/_default/rss.xml +++ b/layouts/_default/rss.xml @@ -9,7 +9,7 @@ {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} - {{ .Permalink }} + {{ .RelPermalink }} {{ .Site.Title }}{{ if ne .Title .Site.Title }}{{ with .Title }} ({{.}}){{ end }}{{ end }} Hugo -- gohugo.io{{ with .Site.LanguageCode }} {{.}}{{end}}{{ with .Site.Author.email }} @@ -18,15 +18,15 @@ {{.}}{{end}}{{ if not .Date.IsZero }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{ with .OutputFormats.Get "RSS" }} - {{ printf "" .Permalink .MediaType | safeHTML }} + {{ printf "" .RelPermalink .MediaType | safeHTML }} {{ end }} {{ range $pages }} {{ .Title }} - {{ .Permalink }} + {{ .RelPermalink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} - {{ .Permalink }} + {{ .RelPermalink }} {{ .Content | html }} {{ end }} diff --git a/layouts/_default/sitemap.xml b/layouts/_default/sitemap.xml index eb83a60..7d4284f 100644 --- a/layouts/_default/sitemap.xml +++ b/layouts/_default/sitemap.xml @@ -2,21 +2,21 @@ {{ range where .Data.Pages "Params.hidden" "!=" true }} - {{- if .Permalink -}} + {{- if .RelPermalink -}} - {{ .Permalink }}{{ if not .Lastmod.IsZero }} + {{ .RelPermalink }}{{ if not .Lastmod.IsZero }} {{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}{{ end }}{{ with .Sitemap.ChangeFreq }} {{ . }}{{ end }}{{ if ge .Sitemap.Priority 0.0 }} {{ .Sitemap.Priority }}{{ end }}{{ if .IsTranslated }}{{ range .Translations }} {{ end }} {{ end }} {{- end -}} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index b5f4bf5..f3d038e 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -16,7 +16,7 @@ {{ end }} {{ with .OutputFormats.Get "rss" -}} - {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} {{ end -}} {{ partial "favicons.html" . }} @@ -56,8 +56,6 @@ {{ $opts := dict "transpiler" "libsass" "targetPath" "css/style.css" }} - - {{ range site.Params.customCSS }} {{ with resources.Get . | toCSS $opts | minify | fingerprint }} diff --git a/layouts/partials/language-switcher.html b/layouts/partials/language-switcher.html index df9c6ef..b4a9a96 100644 --- a/layouts/partials/language-switcher.html +++ b/layouts/partials/language-switcher.html @@ -9,7 +9,7 @@ {{ if eq .Lang $pageLang }}
  • {{ .Language.LanguageName }}
  • {{ else }} -
  • {{ .Language.LanguageName }}
  • +
  • {{ .Language.LanguageName }}
  • {{ end }} {{ end }} diff --git a/layouts/partials/post-info.html b/layouts/partials/post-info.html index 641b66a..ad40c71 100644 --- a/layouts/partials/post-info.html +++ b/layouts/partials/post-info.html @@ -18,7 +18,7 @@ {{ end }} - {{ .Permalink }} + {{ .RelPermalink }} {{ .Params.author | default .Site.Params.author }} @@ -27,7 +27,7 @@ {{ end }} @@ -35,7 +35,7 @@ {{ end }} @@ -43,7 +43,7 @@ {{ end }} diff --git a/layouts/partials/resource.html b/layouts/partials/resource.html index 1ecc5e5..34ae2da 100644 --- a/layouts/partials/resource.html +++ b/layouts/partials/resource.html @@ -15,9 +15,9 @@ {{ $resource = $resource | resources.Fingerprint "sha256" }} {{ if eq .type "css" }} - + {{ else if eq .type "js" }} - + {{ end }} {{ else }} diff --git a/layouts/partials/social-icons.html b/layouts/partials/social-icons.html index e358068..9f5ab93 100644 --- a/layouts/partials/social-icons.html +++ b/layouts/partials/social-icons.html @@ -27,11 +27,11 @@ {{ if .Site.Params.rssAsSocialIcon }} {{ with .Site.Home.OutputFormats.Get "rss" -}}
  • - + {{ partial "font-awesome.html" (dict "iconName" "rss" "custom" false) }}
  • {{ end -}} {{ end }} - \ No newline at end of file + From ddec81c876735e1ed208a55f74f945fc3786b25f Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Tue, 9 Apr 2024 19:56:30 +0800 Subject: [PATCH 04/29] advanced style --- .../assets/css/custom1.scss | 11 ++- .../assets/css/custom2.css | 2 +- .../assets/css/foundation/_code.scss | 2 +- .../content/posts/advanced-style.md | 42 ------------ .../content/posts/advanced-style/index.md | 68 +++++++++++++++++++ .../content/posts/advanced-style/style.css | 8 +++ 6 files changed, 82 insertions(+), 51 deletions(-) delete mode 100644 exampleSiteMultilingual/content/posts/advanced-style.md create mode 100644 exampleSiteMultilingual/content/posts/advanced-style/index.md create mode 100644 exampleSiteMultilingual/content/posts/advanced-style/style.css diff --git a/exampleSiteMultilingual/assets/css/custom1.scss b/exampleSiteMultilingual/assets/css/custom1.scss index aa327f5..2ead31f 100644 --- a/exampleSiteMultilingual/assets/css/custom1.scss +++ b/exampleSiteMultilingual/assets/css/custom1.scss @@ -1,17 +1,14 @@ @import 'foundation/code'; $font-stack: Helvetica, sans-serif; -$primary-color: yellow; -$background-color: pink; +$primary-color: rgb(255, 255, 168); +$background-color: rgb(85, 85, 85); junyi { + display: block; font: 100% $font-stack; color: $primary-color; background-color: $background-color; + margin-top: 1em; } -body .container { - max-width: none; - padding-left: 5em; - padding-right: 5em; -} \ No newline at end of file diff --git a/exampleSiteMultilingual/assets/css/custom2.css b/exampleSiteMultilingual/assets/css/custom2.css index 63633d5..3dbe013 100644 --- a/exampleSiteMultilingual/assets/css/custom2.css +++ b/exampleSiteMultilingual/assets/css/custom2.css @@ -4,4 +4,4 @@ padding: 1em; border-radius: 0.3em; border: 1px solid black; -} \ No newline at end of file +} diff --git a/exampleSiteMultilingual/assets/css/foundation/_code.scss b/exampleSiteMultilingual/assets/css/foundation/_code.scss index 5a98919..c0fa7fd 100644 --- a/exampleSiteMultilingual/assets/css/foundation/_code.scss +++ b/exampleSiteMultilingual/assets/css/foundation/_code.scss @@ -2,4 +2,4 @@ code { padding: .25em; line-height: 2; background-color: rgb(189, 204, 255); -} \ No newline at end of file +} diff --git a/exampleSiteMultilingual/content/posts/advanced-style.md b/exampleSiteMultilingual/content/posts/advanced-style.md deleted file mode 100644 index e09b87f..0000000 --- a/exampleSiteMultilingual/content/posts/advanced-style.md +++ /dev/null @@ -1,42 +0,0 @@ -+++ -author = "Hugo Authors" -title = "Advanced Style" -date = "2024-04-09" -description = "Guide to advanced usage of Anubis2" -tags = [ - "emoji", -] -+++ - -
    -The custom .css .scss .sass file should be placed in assets/ folder. (instead of static/) -
    - -This page is affected by `assets/css/custom1.scss` and `assets/css/custom2.css` - -## How to use PoseCSS - -First, make sure your Hugo version supports Hugo Pipes. Hugo Pipes is available in Hugo `0.46` and later versions. - -Then, add the following content to your Hugo configuration file (such as config.toml) to enable PostCSS: - -```toml -[build] - writeStats = true - -[params] - usePostCSS = true -``` - -In addition, you need to create a postcss.config.js file in the root directory of your project, with the following content: - -```js -module.exports = { - plugins: [ - require('postcss-import')(), - require('postcss-url')(), - require('autoprefixer')(), - // Add more PostCSS plugins here if needed - ] -}; -``` diff --git a/exampleSiteMultilingual/content/posts/advanced-style/index.md b/exampleSiteMultilingual/content/posts/advanced-style/index.md new file mode 100644 index 0000000..250fe0d --- /dev/null +++ b/exampleSiteMultilingual/content/posts/advanced-style/index.md @@ -0,0 +1,68 @@ ++++ +author = "Hugo Authors" +title = "Advanced Style" +date = "2024-04-09" +description = "Guide to advanced usage of Anubis2" +tags = [ + "emoji", +] ++++ + +
    +The custom .css .scss .sass file should be placed in assets/ folder. (instead of static/) +
    + + +This page is affected by assets/css/custom1.scss and assets/css/custom2.css and advanced-style/style.css + + +advanced-style/style.css affects only the current page. + +```html + +``` + + + +assets/css/custom1.scss and assets/css/custom2.scss will have global effect. + +```scss +// assets/css/custom2.css +.anubis-custom-style { + background-color: pink; + color: black; + padding: 1em; + border-radius: 0.3em; + border: 1px solid black; +} +``` + +```scss +// assets/css/foundation/_code.scss +code { + padding: .25em; + line-height: 2; + background-color: rgb(189, 204, 255); +} +``` + +```scss +// assets/css/custom1.scss +@import 'foundation/code'; + +$font-stack: Helvetica, sans-serif; +$primary-color: rgb(255, 255, 168); +$background-color: rgb(85, 85, 85); + +junyi { + display: block; + font: 100% $font-stack; + color: $primary-color; + background-color: $background-color; + margin-top: 1em; +} +``` \ No newline at end of file diff --git a/exampleSiteMultilingual/content/posts/advanced-style/style.css b/exampleSiteMultilingual/content/posts/advanced-style/style.css new file mode 100644 index 0000000..6937f22 --- /dev/null +++ b/exampleSiteMultilingual/content/posts/advanced-style/style.css @@ -0,0 +1,8 @@ +@import 'subfolder/hello.scss'; + +.container { + max-width: none; + padding-left: 5em; + padding-right: 5em; + background-color: white; +} \ No newline at end of file From a1cd164e9a58b919a072f2d69fbc450ece2dd83f Mon Sep 17 00:00:00 2001 From: Junyi Hou Date: Tue, 9 Apr 2024 20:03:09 +0800 Subject: [PATCH 05/29] pre-commit formatter --- LICENSE | 2 +- archetypes/default.md | 1 - assets/css/dark.css | 2 +- assets/css/light.css | 2 +- assets/css/main.css | 2 +- assets/images/link.svg | 2 +- assets/js/copy-code.js | 2 +- assets/js/load-mermaid.js | 12 ++++++------ data/social.yaml | 2 +- exampleSiteMultilingual/content/_index.md | 1 - exampleSiteMultilingual/content/about.md | 3 --- exampleSiteMultilingual/content/about.pl.md | 3 --- exampleSiteMultilingual/content/about.zh.md | 3 --- exampleSiteMultilingual/content/archives.md | 2 +- exampleSiteMultilingual/content/homepage/about.md | 2 +- exampleSiteMultilingual/content/homepage/work.md | 2 +- .../content/post/emoji-support.md | 6 +++--- .../content/post/emoji-support.pl.md | 6 +++--- .../content/post/hidden-post.md | 2 +- .../content/post/hidden-post.pl.md | 2 +- .../content/post/markdown-syntax.md | 1 - .../content/post/markdown-syntax.pl.md | 1 - .../content/post/math-typesetting.md | 7 +++---- .../content/post/math-typesetting.pl.md | 7 +++---- .../content/posts/advanced copy.md | 4 ++-- exampleSiteMultilingual/static/fa-icons/docs.svg | 2 +- i18n/bn.yaml | 2 +- i18n/de.yaml | 2 +- i18n/en.yaml | 2 +- i18n/fr.yaml | 2 +- i18n/id.yaml | 2 +- i18n/pl.yaml | 2 +- i18n/pt.yaml | 2 +- i18n/ru.yaml | 2 +- i18n/tw.yaml | 2 +- layouts/404.html | 2 +- layouts/_default/_markup/render-heading.html | 2 +- layouts/_default/baseof.html | 4 ++-- layouts/_default/list.html | 2 +- layouts/_default/single.html | 13 ++++++------- layouts/_default/terms.html | 2 +- layouts/index.html | 2 +- layouts/partials/comments.html | 2 +- layouts/partials/fa-icons/email.svg | 2 +- layouts/partials/fa-icons/facebook.svg | 2 +- layouts/partials/fa-icons/github.svg | 2 +- layouts/partials/fa-icons/halfcircle.svg | 2 +- layouts/partials/fa-icons/instagram.svg | 2 +- layouts/partials/fa-icons/linkedin.svg | 2 +- layouts/partials/fa-icons/mastodon.svg | 2 +- layouts/partials/fa-icons/patreon.svg | 2 +- layouts/partials/fa-icons/reddit.svg | 2 +- layouts/partials/fa-icons/rss.svg | 2 +- layouts/partials/fa-icons/snapchat.svg | 2 +- layouts/partials/fa-icons/soundcloud.svg | 2 +- layouts/partials/fa-icons/spotify.svg | 2 +- layouts/partials/fa-icons/telegram.svg | 2 +- layouts/partials/fa-icons/twitch.svg | 2 +- layouts/partials/fa-icons/twitter.svg | 2 +- layouts/partials/fa-icons/vk.svg | 2 +- layouts/partials/fa-icons/youtube.svg | 2 +- layouts/partials/font-awesome.html | 4 ++-- layouts/partials/footer-extra.html | 2 +- layouts/partials/footer.html | 4 ++-- layouts/partials/giscus.html | 2 +- layouts/partials/graphcomment.html | 2 +- layouts/partials/h-card.html | 8 ++++---- layouts/partials/head-extra.html | 2 +- layouts/partials/header-extra.html | 2 +- layouts/partials/header.html | 6 +++--- layouts/partials/mathjax_support.html | 2 +- layouts/partials/pagination-extra.html | 2 +- layouts/partials/post-language-switcher.html | 4 ++-- layouts/partials/post-summary.html | 4 ++-- layouts/partials/site-title.html | 2 +- layouts/partials/tabler-icons/4chan.svg | 2 +- layouts/partials/tabler-icons/docs.svg | 2 +- layouts/partials/tabler-icons/email.svg | 2 +- layouts/partials/tabler-icons/facebook.svg | 2 +- layouts/partials/tabler-icons/github.svg | 2 +- layouts/partials/tabler-icons/gitlab.svg | 2 +- layouts/partials/tabler-icons/instagram.svg | 2 +- layouts/partials/tabler-icons/leetcode.svg | 2 +- layouts/partials/tabler-icons/linkedin.svg | 2 +- layouts/partials/tabler-icons/mastodon.svg | 2 +- layouts/partials/tabler-icons/medium.svg | 2 +- layouts/partials/tabler-icons/netease-music.svg | 2 +- layouts/partials/tabler-icons/notion.svg | 2 +- layouts/partials/tabler-icons/patreon.svg | 2 +- layouts/partials/tabler-icons/qq.svg | 2 +- layouts/partials/tabler-icons/reddit.svg | 2 +- layouts/partials/tabler-icons/rss.svg | 2 +- layouts/partials/tabler-icons/skype.svg | 2 +- layouts/partials/tabler-icons/slack.svg | 2 +- layouts/partials/tabler-icons/snapchat.svg | 2 +- layouts/partials/tabler-icons/soundcloud.svg | 2 +- layouts/partials/tabler-icons/spotify.svg | 2 +- layouts/partials/tabler-icons/steam.svg | 2 +- layouts/partials/tabler-icons/teams.svg | 2 +- layouts/partials/tabler-icons/telegram.svg | 2 +- layouts/partials/tabler-icons/theme-dark.svg | 2 +- layouts/partials/tabler-icons/theme-light.svg | 2 +- layouts/partials/tabler-icons/tiktok.svg | 2 +- layouts/partials/tabler-icons/tinder.svg | 2 +- layouts/partials/tabler-icons/tumblr.svg | 2 +- layouts/partials/tabler-icons/twitch.svg | 2 +- layouts/partials/tabler-icons/twitter.svg | 2 +- layouts/partials/tabler-icons/vk.svg | 2 +- layouts/partials/tabler-icons/weibo.svg | 2 +- layouts/partials/tabler-icons/x.svg | 2 +- layouts/partials/tabler-icons/youtube.svg | 2 +- layouts/partials/tabler-icons/zhihu.svg | 2 +- layouts/partials/theme-switcher.html | 14 +++++++------- layouts/partials/toc.html | 6 +++--- layouts/partials/utterances.html | 2 +- layouts/shortcodes/video.html | 11 +++++------ theme.toml | 6 +++--- 117 files changed, 153 insertions(+), 170 deletions(-) diff --git a/LICENSE b/LICENSE index b76ea6d..00b76c4 100644 --- a/LICENSE +++ b/LICENSE @@ -17,4 +17,4 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/archetypes/default.md b/archetypes/default.md index 00e77bd..26f317f 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -3,4 +3,3 @@ title: "{{ replace .Name "-" " " | title }}" date: {{ .Date }} draft: true --- - diff --git a/assets/css/dark.css b/assets/css/dark.css index e8a73cc..d01d145 100644 --- a/assets/css/dark.css +++ b/assets/css/dark.css @@ -74,4 +74,4 @@ html[data-theme='dark'] { --svg-color: #ccc; --svg-state-color: #ff5858; -} \ No newline at end of file +} diff --git a/assets/css/light.css b/assets/css/light.css index e5c0364..c1df0e4 100644 --- a/assets/css/light.css +++ b/assets/css/light.css @@ -58,7 +58,7 @@ html[data-theme="light"] { --pre-bg-color: #eff1f2; --pre-border-color: #e1e5e9; --kbd-bg-color: #f7f7f7; - + --bq-color: #ccc; --hr-color: #ccc; diff --git a/assets/css/main.css b/assets/css/main.css index eb85dcf..70a5064 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -888,4 +888,4 @@ ul.footer-menu>li { .post-pagination .pagination-item { max-width: 10em; } -} \ No newline at end of file +} diff --git a/assets/images/link.svg b/assets/images/link.svg index 17830a4..28c8af8 100644 --- a/assets/images/link.svg +++ b/assets/images/link.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/assets/js/copy-code.js b/assets/js/copy-code.js index d23b0cf..64aec0c 100644 --- a/assets/js/copy-code.js +++ b/assets/js/copy-code.js @@ -61,4 +61,4 @@ document.addEventListener("DOMContentLoaded", function(event) { // Add copy button to code blocks let highlightBlocks = document.getElementsByClassName('highlight'); Array.prototype.forEach.call(highlightBlocks, addCopyButton); -}, false); \ No newline at end of file +}, false); diff --git a/assets/js/load-mermaid.js b/assets/js/load-mermaid.js index 75b1df5..0c5f143 100644 --- a/assets/js/load-mermaid.js +++ b/assets/js/load-mermaid.js @@ -7,7 +7,7 @@ (function(window){ 'use strict' - + const elementCode = '.mermaid' const loadMermaid = function(theme) { window.mermaid.initialize({theme}) @@ -26,7 +26,7 @@ } }); } catch (error) { - reject(error) + reject(error) } }) } @@ -46,11 +46,11 @@ } }); } catch (error) { - reject(error) + reject(error) } }) - } - + } + const init = ()=>{ saveOriginalData() .catch( console.error ) @@ -66,4 +66,4 @@ }) } window.initMermaid = init - })(window); \ No newline at end of file + })(window); diff --git a/data/social.yaml b/data/social.yaml index 4c8461b..65e0ba3 100644 --- a/data/social.yaml +++ b/data/social.yaml @@ -35,4 +35,4 @@ social_icons: tumblr: weibo: x: https://twitter.com/%s - zhihu: https://www.zhihu.com/people/%s \ No newline at end of file + zhihu: https://www.zhihu.com/people/%s diff --git a/exampleSiteMultilingual/content/_index.md b/exampleSiteMultilingual/content/_index.md index 6abc75e..ed6494b 100644 --- a/exampleSiteMultilingual/content/_index.md +++ b/exampleSiteMultilingual/content/_index.md @@ -1,4 +1,3 @@ +++ author = "Hugo Authors" +++ - diff --git a/exampleSiteMultilingual/content/about.md b/exampleSiteMultilingual/content/about.md index 438c830..3b66602 100644 --- a/exampleSiteMultilingual/content/about.md +++ b/exampleSiteMultilingual/content/about.md @@ -38,6 +38,3 @@ Hugo is for people who want to hand code their own website without worrying abou Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. Learn more and contribute on [GitHub](https://github.com/gohugoio). - - - diff --git a/exampleSiteMultilingual/content/about.pl.md b/exampleSiteMultilingual/content/about.pl.md index 438c830..3b66602 100644 --- a/exampleSiteMultilingual/content/about.pl.md +++ b/exampleSiteMultilingual/content/about.pl.md @@ -38,6 +38,3 @@ Hugo is for people who want to hand code their own website without worrying abou Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. Learn more and contribute on [GitHub](https://github.com/gohugoio). - - - diff --git a/exampleSiteMultilingual/content/about.zh.md b/exampleSiteMultilingual/content/about.zh.md index 438c830..3b66602 100644 --- a/exampleSiteMultilingual/content/about.zh.md +++ b/exampleSiteMultilingual/content/about.zh.md @@ -38,6 +38,3 @@ Hugo is for people who want to hand code their own website without worrying abou Websites built with Hugo are extremely fast, secure and can be deployed anywhere including, AWS, GitHub Pages, Heroku, Netlify and any other hosting provider. Learn more and contribute on [GitHub](https://github.com/gohugoio). - - - diff --git a/exampleSiteMultilingual/content/archives.md b/exampleSiteMultilingual/content/archives.md index 98a1ee9..db16eed 100644 --- a/exampleSiteMultilingual/content/archives.md +++ b/exampleSiteMultilingual/content/archives.md @@ -2,4 +2,4 @@ date: 2019-05-28 type: section layout: "archives" ---- \ No newline at end of file +--- diff --git a/exampleSiteMultilingual/content/homepage/about.md b/exampleSiteMultilingual/content/homepage/about.md index c2ba680..7b4bc91 100644 --- a/exampleSiteMultilingual/content/homepage/about.md +++ b/exampleSiteMultilingual/content/homepage/about.md @@ -4,4 +4,4 @@ button: 'About us' weight: 2 --- -Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. ipsum dolor sit amet, et essent mediocritatem quo, \ No newline at end of file +Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. ipsum dolor sit amet, et essent mediocritatem quo, diff --git a/exampleSiteMultilingual/content/homepage/work.md b/exampleSiteMultilingual/content/homepage/work.md index f2fee73..f99bc99 100644 --- a/exampleSiteMultilingual/content/homepage/work.md +++ b/exampleSiteMultilingual/content/homepage/work.md @@ -4,4 +4,4 @@ button: 'Our Work' weight: 1 --- -Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Numquam dolores mel eu, mea docendi omittantur et, mea ea duis erat. Elit melius cu ius. Per ex novum tantas putant, ei his nullam aliquam apeirian. Aeterno quaestio constituto sea an, no eum intellegat assueverit. \ No newline at end of file +Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. Numquam dolores mel eu, mea docendi omittantur et, mea ea duis erat. Elit melius cu ius. Per ex novum tantas putant, ei his nullam aliquam apeirian. Aeterno quaestio constituto sea an, no eum intellegat assueverit. diff --git a/exampleSiteMultilingual/content/post/emoji-support.md b/exampleSiteMultilingual/content/post/emoji-support.md index ecf6c86..119346a 100644 --- a/exampleSiteMultilingual/content/post/emoji-support.md +++ b/exampleSiteMultilingual/content/post/emoji-support.md @@ -8,9 +8,9 @@ tags = [ ] +++ -Emoji can be enabled in a Hugo project in a number of ways. +Emoji can be enabled in a Hugo project in a number of ways. -The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). +The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). To enable emoji globally, set `enableEmoji` to `true` in your site’s [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. @@ -44,4 +44,4 @@ font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,And } } -{{< /css.inline >}} \ No newline at end of file +{{< /css.inline >}} diff --git a/exampleSiteMultilingual/content/post/emoji-support.pl.md b/exampleSiteMultilingual/content/post/emoji-support.pl.md index ecf6c86..119346a 100644 --- a/exampleSiteMultilingual/content/post/emoji-support.pl.md +++ b/exampleSiteMultilingual/content/post/emoji-support.pl.md @@ -8,9 +8,9 @@ tags = [ ] +++ -Emoji can be enabled in a Hugo project in a number of ways. +Emoji can be enabled in a Hugo project in a number of ways. -The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). +The [`emojify`](https://gohugo.io/functions/emojify/) function can be called directly in templates or [Inline Shortcodes](https://gohugo.io/templates/shortcode-templates/#inline-shortcodes). To enable emoji globally, set `enableEmoji` to `true` in your site’s [configuration](https://gohugo.io/getting-started/configuration/) and then you can type emoji shorthand codes directly in content files; e.g. @@ -44,4 +44,4 @@ font-family: Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,And } } -{{< /css.inline >}} \ No newline at end of file +{{< /css.inline >}} diff --git a/exampleSiteMultilingual/content/post/hidden-post.md b/exampleSiteMultilingual/content/post/hidden-post.md index 96b33ed..7556132 100644 --- a/exampleSiteMultilingual/content/post/hidden-post.md +++ b/exampleSiteMultilingual/content/post/hidden-post.md @@ -9,4 +9,4 @@ tags = [ hidden = true +++ -This is hidden post \ No newline at end of file +This is hidden post diff --git a/exampleSiteMultilingual/content/post/hidden-post.pl.md b/exampleSiteMultilingual/content/post/hidden-post.pl.md index 96b33ed..7556132 100644 --- a/exampleSiteMultilingual/content/post/hidden-post.pl.md +++ b/exampleSiteMultilingual/content/post/hidden-post.pl.md @@ -9,4 +9,4 @@ tags = [ hidden = true +++ -This is hidden post \ No newline at end of file +This is hidden post diff --git a/exampleSiteMultilingual/content/post/markdown-syntax.md b/exampleSiteMultilingual/content/post/markdown-syntax.md index 534b67b..e68d10e 100644 --- a/exampleSiteMultilingual/content/post/markdown-syntax.md +++ b/exampleSiteMultilingual/content/post/markdown-syntax.md @@ -144,4 +144,3 @@ Xn + Yn = Zn Press CTRL+ALT+Delete to end the session. Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. - diff --git a/exampleSiteMultilingual/content/post/markdown-syntax.pl.md b/exampleSiteMultilingual/content/post/markdown-syntax.pl.md index 49114db..78175fc 100644 --- a/exampleSiteMultilingual/content/post/markdown-syntax.pl.md +++ b/exampleSiteMultilingual/content/post/markdown-syntax.pl.md @@ -143,4 +143,3 @@ Xn + Yn = Zn Press CTRL+ALT+Delete to end the session. Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. - diff --git a/exampleSiteMultilingual/content/post/math-typesetting.md b/exampleSiteMultilingual/content/post/math-typesetting.md index a1467e3..9d96925 100644 --- a/exampleSiteMultilingual/content/post/math-typesetting.md +++ b/exampleSiteMultilingual/content/post/math-typesetting.md @@ -13,13 +13,13 @@ In this example we will be using [KaTeX](https://katex.org/) - Create a partial under `/layouts/partials/math.html` - Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. -- Include the partial in your templates like so: +- Include the partial in your templates like so: ``` {{ if or .Params.math .Site.Params.math }} {{ partial "math.html" . }} {{ end }} -``` +``` - To enable KaTex globally set the parameter `math` to `true` in a project's configuration - To enable KaTex on a per page basis include the parameter `math: true` in content files. @@ -40,6 +40,5 @@ Inline math: $$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $$ Block math: $$ - \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } + \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } $$ - diff --git a/exampleSiteMultilingual/content/post/math-typesetting.pl.md b/exampleSiteMultilingual/content/post/math-typesetting.pl.md index a1467e3..9d96925 100644 --- a/exampleSiteMultilingual/content/post/math-typesetting.pl.md +++ b/exampleSiteMultilingual/content/post/math-typesetting.pl.md @@ -13,13 +13,13 @@ In this example we will be using [KaTeX](https://katex.org/) - Create a partial under `/layouts/partials/math.html` - Within this partial reference the [Auto-render Extension](https://katex.org/docs/autorender.html) or host these scripts locally. -- Include the partial in your templates like so: +- Include the partial in your templates like so: ``` {{ if or .Params.math .Site.Params.math }} {{ partial "math.html" . }} {{ end }} -``` +``` - To enable KaTex globally set the parameter `math` to `true` in a project's configuration - To enable KaTex on a per page basis include the parameter `math: true` in content files. @@ -40,6 +40,5 @@ Inline math: $$ \varphi = \dfrac{1+\sqrt5}{2}= 1.6180339887… $$ Block math: $$ - \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } + \varphi = 1+\frac{1} {1+\frac{1} {1+\frac{1} {1+\cdots} } } $$ - diff --git a/exampleSiteMultilingual/content/posts/advanced copy.md b/exampleSiteMultilingual/content/posts/advanced copy.md index 5e7db92..9fc13b1 100644 --- a/exampleSiteMultilingual/content/posts/advanced copy.md +++ b/exampleSiteMultilingual/content/posts/advanced copy.md @@ -30,7 +30,7 @@ interface User { lastName: string role: string } - + function updateUser(id: number, update: Partial) { const user = getUser(id) const newUser = { ...user, ...update } @@ -55,4 +55,4 @@ Press CTRL+ALT+Delete to end the session. Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. -
    Press CTRL+ALT+Delete to end the session.
    \ No newline at end of file +
    Press CTRL+ALT+Delete to end the session.
    diff --git a/exampleSiteMultilingual/static/fa-icons/docs.svg b/exampleSiteMultilingual/static/fa-icons/docs.svg index 5380074..a6bf4c5 100644 --- a/exampleSiteMultilingual/static/fa-icons/docs.svg +++ b/exampleSiteMultilingual/static/fa-icons/docs.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/i18n/bn.yaml b/i18n/bn.yaml index 5bdcb1a..e3603bc 100644 --- a/i18n/bn.yaml +++ b/i18n/bn.yaml @@ -38,4 +38,4 @@ skipToContent: other: "প্রচ্ছদে প্রবেশ করুন" readNext: - other: "পরের প্রচ্ছদ" \ No newline at end of file + other: "পরের প্রচ্ছদ" diff --git a/i18n/de.yaml b/i18n/de.yaml index 16108e1..ad0f652 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -38,4 +38,4 @@ skipToContent: other: "Zum Hauptinhalt springen" readNext: - other: "Weiter lesen" \ No newline at end of file + other: "Weiter lesen" diff --git a/i18n/en.yaml b/i18n/en.yaml index 4ca1dc5..47a60ff 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -56,4 +56,4 @@ toOldPost: other: "to old post" videoIsNotSupported: - other: "Your browser does not support video" \ No newline at end of file + other: "Your browser does not support video" diff --git a/i18n/fr.yaml b/i18n/fr.yaml index 018cb5f..3e456e1 100644 --- a/i18n/fr.yaml +++ b/i18n/fr.yaml @@ -38,4 +38,4 @@ skipToContent: other: "Aller au contenu" readNext: - other: "Lire la suite" \ No newline at end of file + other: "Lire la suite" diff --git a/i18n/id.yaml b/i18n/id.yaml index 8ea19a6..c9d81aa 100644 --- a/i18n/id.yaml +++ b/i18n/id.yaml @@ -38,4 +38,4 @@ skipToContent: other: "Lompat ke konten" readNext: - other: "Baca Selanjutnya" \ No newline at end of file + other: "Baca Selanjutnya" diff --git a/i18n/pl.yaml b/i18n/pl.yaml index d9dc79d..5107482 100644 --- a/i18n/pl.yaml +++ b/i18n/pl.yaml @@ -38,4 +38,4 @@ skipToContent: other: "Przejdź do głównej zawartości" readNext: - other: "Czytaj dalej" \ No newline at end of file + other: "Czytaj dalej" diff --git a/i18n/pt.yaml b/i18n/pt.yaml index fe9fa8e..87a56d5 100644 --- a/i18n/pt.yaml +++ b/i18n/pt.yaml @@ -38,4 +38,4 @@ skipToContent: other: "Pular para o conteúdo principal" readNext: - other: "Leia a seguir" \ No newline at end of file + other: "Leia a seguir" diff --git a/i18n/ru.yaml b/i18n/ru.yaml index 66cd083..b33d3fd 100644 --- a/i18n/ru.yaml +++ b/i18n/ru.yaml @@ -53,4 +53,4 @@ toOldPost: other: "к старой записи" videoIsNotSupported: - other: "Ваш браузер не поддерживает видео" \ No newline at end of file + other: "Ваш браузер не поддерживает видео" diff --git a/i18n/tw.yaml b/i18n/tw.yaml index 5a42c8c..c8c64a2 100644 --- a/i18n/tw.yaml +++ b/i18n/tw.yaml @@ -38,4 +38,4 @@ skipToContent: other: "跳至內容" readNext: - other: "閱讀下一篇" \ No newline at end of file + other: "閱讀下一篇" diff --git a/layouts/404.html b/layouts/404.html index 4ad6603..e9fbfa7 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -5,4 +5,4 @@

    Go Home

    Sorry, this Page is not available. -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html index 7c7f3ec..00294cc 100644 --- a/layouts/_default/_markup/render-heading.html +++ b/layouts/_default/_markup/render-heading.html @@ -5,4 +5,4 @@ {{ .Text | safeHTML }} - \ No newline at end of file + diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 8a75685..efafaf2 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -12,12 +12,12 @@ {{ i18n "skipToContent" }}
    -
    +
    {{ block "header" . }} {{ partial "header.html" . }} {{ end }}
    -
    +
    {{ block "main" . }}{{ end }}
    {{ block "footer" . }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ea25bcf..03e3d11 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -32,4 +32,4 @@

    - + {{ if gt .Site.Params.readNextPosts 0 }} {{ $related := .Site.RegularPages.Related . | first .Site.Params.readNextPosts }} {{ with $related }} @@ -41,15 +41,15 @@

    {{ if not .Params.disableComments }} {{ partial "comments.html" . }} {{ end }} - - {{/* When you use ```mermaid``, render-codeblock-mermaid.html is called and + + {{/* When you use ```mermaid``, render-codeblock-mermaid.html is called and `.Store.Set "hasMermaid"` is executed. `.Store.Get "hasMermaid"` will return true and mermaid.js will be loaded. */}} - + {{ if .Store.Get "hasMermaid" }} {{ partial "resource.html" (dict "context" . "type" "js" "filename" "js/load-mermaid.js") }} - + {{ $colorTheme := "light" }} {{ if and (isset site.Params "colortheme") (ne site.Params.colortheme "") }} {{ $colorTheme = site.Params.colortheme | lower }} @@ -66,7 +66,7 @@ } return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"; } - + import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs'; window.mermaid = mermaid; window.initMermaid() @@ -74,4 +74,3 @@ {{ end }} {{ end }} - diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 2eb6d47..7a19217 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -16,4 +16,4 @@

    {{ i18n .Title | markdownify }}

    {{ end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/index.html b/layouts/index.html index 44f2764..f134cf2 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -11,4 +11,4 @@ {{ partial "pagination.html" . }}
    -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html index e58321f..aae2a24 100644 --- a/layouts/partials/comments.html +++ b/layouts/partials/comments.html @@ -16,4 +16,4 @@ {{ if .Site.Params.GiscusRepo}} {{ partial "giscus.html" . }} -{{ end}} \ No newline at end of file +{{ end}} diff --git a/layouts/partials/fa-icons/email.svg b/layouts/partials/fa-icons/email.svg index 24e6760..c3a463b 100644 --- a/layouts/partials/fa-icons/email.svg +++ b/layouts/partials/fa-icons/email.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/facebook.svg b/layouts/partials/fa-icons/facebook.svg index 77829b4..3cb46f5 100644 --- a/layouts/partials/fa-icons/facebook.svg +++ b/layouts/partials/fa-icons/facebook.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/github.svg b/layouts/partials/fa-icons/github.svg index 1a4d15c..beedbf1 100644 --- a/layouts/partials/fa-icons/github.svg +++ b/layouts/partials/fa-icons/github.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/halfcircle.svg b/layouts/partials/fa-icons/halfcircle.svg index e2639e2..fcff4c5 100644 --- a/layouts/partials/fa-icons/halfcircle.svg +++ b/layouts/partials/fa-icons/halfcircle.svg @@ -1,3 +1,3 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/instagram.svg b/layouts/partials/fa-icons/instagram.svg index 46aab1a..6981448 100644 --- a/layouts/partials/fa-icons/instagram.svg +++ b/layouts/partials/fa-icons/instagram.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/linkedin.svg b/layouts/partials/fa-icons/linkedin.svg index 95faf46..bdde927 100644 --- a/layouts/partials/fa-icons/linkedin.svg +++ b/layouts/partials/fa-icons/linkedin.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/mastodon.svg b/layouts/partials/fa-icons/mastodon.svg index 8532bd0..2dc91f0 100644 --- a/layouts/partials/fa-icons/mastodon.svg +++ b/layouts/partials/fa-icons/mastodon.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/patreon.svg b/layouts/partials/fa-icons/patreon.svg index 5eae6c0..d54c852 100644 --- a/layouts/partials/fa-icons/patreon.svg +++ b/layouts/partials/fa-icons/patreon.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/reddit.svg b/layouts/partials/fa-icons/reddit.svg index 2de59d4..df4bca1 100644 --- a/layouts/partials/fa-icons/reddit.svg +++ b/layouts/partials/fa-icons/reddit.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/rss.svg b/layouts/partials/fa-icons/rss.svg index 606aa89..2f83854 100644 --- a/layouts/partials/fa-icons/rss.svg +++ b/layouts/partials/fa-icons/rss.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/snapchat.svg b/layouts/partials/fa-icons/snapchat.svg index ecf5cf4..733b224 100644 --- a/layouts/partials/fa-icons/snapchat.svg +++ b/layouts/partials/fa-icons/snapchat.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/soundcloud.svg b/layouts/partials/fa-icons/soundcloud.svg index 0901cd1..35f9332 100644 --- a/layouts/partials/fa-icons/soundcloud.svg +++ b/layouts/partials/fa-icons/soundcloud.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/spotify.svg b/layouts/partials/fa-icons/spotify.svg index 718d287..3f422c5 100644 --- a/layouts/partials/fa-icons/spotify.svg +++ b/layouts/partials/fa-icons/spotify.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/telegram.svg b/layouts/partials/fa-icons/telegram.svg index d60b094..26a0a33 100644 --- a/layouts/partials/fa-icons/telegram.svg +++ b/layouts/partials/fa-icons/telegram.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/twitch.svg b/layouts/partials/fa-icons/twitch.svg index a3c407a..3d91f31 100644 --- a/layouts/partials/fa-icons/twitch.svg +++ b/layouts/partials/fa-icons/twitch.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/twitter.svg b/layouts/partials/fa-icons/twitter.svg index 3db10f6..881b95c 100644 --- a/layouts/partials/fa-icons/twitter.svg +++ b/layouts/partials/fa-icons/twitter.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/vk.svg b/layouts/partials/fa-icons/vk.svg index 960003d..3887fe1 100644 --- a/layouts/partials/fa-icons/vk.svg +++ b/layouts/partials/fa-icons/vk.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/fa-icons/youtube.svg b/layouts/partials/fa-icons/youtube.svg index adfe427..ec6c92d 100644 --- a/layouts/partials/fa-icons/youtube.svg +++ b/layouts/partials/fa-icons/youtube.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/font-awesome.html b/layouts/partials/font-awesome.html index 60057f1..09b9cb3 100644 --- a/layouts/partials/font-awesome.html +++ b/layouts/partials/font-awesome.html @@ -2,7 +2,7 @@ {{ $dict := newScratch }} - + {{ if (eq .iconName "docs")}} \ No newline at end of file + diff --git a/layouts/partials/footer-extra.html b/layouts/partials/footer-extra.html index 0e22c9a..d1f0ad9 100644 --- a/layouts/partials/footer-extra.html +++ b/layouts/partials/footer-extra.html @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 9f2ca6e..224317c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -13,7 +13,7 @@ {{ end }} {{ end }} - +
    © {{ if isset .Site.Params "author"}}{{ .Site.Params.author }}, {{end}}{{ now.Year }} {{ if .Site.Params.UmamiAnalytics.shareUrl }} @@ -23,7 +23,7 @@
    {{ i18n "powered" }} Hugo, {{ i18n "theme" }} Anubis2.
    {{ partial "footer-extra.html" . }} -
    +
    {{ partial "h-card.html" . }} diff --git a/layouts/partials/giscus.html b/layouts/partials/giscus.html index eb6ce65..0d0f173 100644 --- a/layouts/partials/giscus.html +++ b/layouts/partials/giscus.html @@ -46,4 +46,4 @@ data-reactions-enabled="1" data-emit-metadata="0" data-input-position="bottom" data-theme="{{ $theme }}" data-lang="{{ $language }}" crossorigin="anonymous" {{ if $lazyload }} data-loading="lazy" {{ end }} async> -*/}} \ No newline at end of file +*/}} diff --git a/layouts/partials/graphcomment.html b/layouts/partials/graphcomment.html index 9cd1d28..bbfeb41 100644 --- a/layouts/partials/graphcomment.html +++ b/layouts/partials/graphcomment.html @@ -27,6 +27,6 @@ gc.onload = __semio__onload; gc.defer = true; gc.src = 'https://integration.graphcomment.com/gc_graphlogin.js?' + Date.now(); (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(gc); })(); - + diff --git a/layouts/partials/h-card.html b/layouts/partials/h-card.html index 66cf479..d4bc60c 100644 --- a/layouts/partials/h-card.html +++ b/layouts/partials/h-card.html @@ -1,13 +1,13 @@

    - {{ .Site.Params.author }} + {{ .Site.Params.author }} - {{ if .Site.Params.email }} + {{ if .Site.Params.email }} / {{ end }} - {{ if .Site.Params.avatar }} + {{ if .Site.Params.avatar }} {{ end }} -

    \ No newline at end of file +

    diff --git a/layouts/partials/head-extra.html b/layouts/partials/head-extra.html index 0e22c9a..d1f0ad9 100644 --- a/layouts/partials/head-extra.html +++ b/layouts/partials/head-extra.html @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/header-extra.html b/layouts/partials/header-extra.html index 0e22c9a..d1f0ad9 100644 --- a/layouts/partials/header-extra.html +++ b/layouts/partials/header-extra.html @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 950cbb6..1cd71a7 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,11 +1,11 @@
    {{ partial "site-title.html" . }} - {{ partial "theme-switcher.html" . }} + {{ partial "theme-switcher.html" . }} {{ partial "social-icons.html" . }}
    - +
    @@ -22,4 +22,4 @@ {{ if .Site.Params.mathjax }}{{ partial "mathjax_support.html" . }}{{ end }} -{{ partial "header-extra.html" . }} \ No newline at end of file +{{ partial "header-extra.html" . }} diff --git a/layouts/partials/mathjax_support.html b/layouts/partials/mathjax_support.html index 0dc7dd1..86ec9d0 100644 --- a/layouts/partials/mathjax_support.html +++ b/layouts/partials/mathjax_support.html @@ -19,4 +19,4 @@ \ No newline at end of file + src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"> diff --git a/layouts/partials/pagination-extra.html b/layouts/partials/pagination-extra.html index 0e22c9a..d1f0ad9 100644 --- a/layouts/partials/pagination-extra.html +++ b/layouts/partials/pagination-extra.html @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/post-language-switcher.html b/layouts/partials/post-language-switcher.html index e814393..c492402 100644 --- a/layouts/partials/post-language-switcher.html +++ b/layouts/partials/post-language-switcher.html @@ -9,10 +9,10 @@ {{ else }}
  • - {{ upper .Lang }} + {{ upper .Lang }}
  • {{ end }} {{ end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/post-summary.html b/layouts/partials/post-summary.html index 72f5148..18f991e 100644 --- a/layouts/partials/post-summary.html +++ b/layouts/partials/post-summary.html @@ -16,6 +16,6 @@

    {{ i18n "readMore" }} {{ end }} - + {{ partial "post-info.html" . }} - \ No newline at end of file + diff --git a/layouts/partials/site-title.html b/layouts/partials/site-title.html index 6ed0d70..a1f1ec5 100644 --- a/layouts/partials/site-title.html +++ b/layouts/partials/site-title.html @@ -1,3 +1,3 @@

    {{ .Site.Title }} -

    \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/4chan.svg b/layouts/partials/tabler-icons/4chan.svg index 7127408..4ae85f1 100644 --- a/layouts/partials/tabler-icons/4chan.svg +++ b/layouts/partials/tabler-icons/4chan.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/docs.svg b/layouts/partials/tabler-icons/docs.svg index 559e19b..d7dd53e 100644 --- a/layouts/partials/tabler-icons/docs.svg +++ b/layouts/partials/tabler-icons/docs.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/email.svg b/layouts/partials/tabler-icons/email.svg index cecc719..a88608d 100644 --- a/layouts/partials/tabler-icons/email.svg +++ b/layouts/partials/tabler-icons/email.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/facebook.svg b/layouts/partials/tabler-icons/facebook.svg index 47ad743..c5bb158 100644 --- a/layouts/partials/tabler-icons/facebook.svg +++ b/layouts/partials/tabler-icons/facebook.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/github.svg b/layouts/partials/tabler-icons/github.svg index ad12afd..62acd1e 100644 --- a/layouts/partials/tabler-icons/github.svg +++ b/layouts/partials/tabler-icons/github.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/gitlab.svg b/layouts/partials/tabler-icons/gitlab.svg index 6de1fad..d6340d4 100644 --- a/layouts/partials/tabler-icons/gitlab.svg +++ b/layouts/partials/tabler-icons/gitlab.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/instagram.svg b/layouts/partials/tabler-icons/instagram.svg index cb790d6..099593d 100644 --- a/layouts/partials/tabler-icons/instagram.svg +++ b/layouts/partials/tabler-icons/instagram.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/leetcode.svg b/layouts/partials/tabler-icons/leetcode.svg index 3fed55a..109890d 100644 --- a/layouts/partials/tabler-icons/leetcode.svg +++ b/layouts/partials/tabler-icons/leetcode.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/linkedin.svg b/layouts/partials/tabler-icons/linkedin.svg index a31391c..c5436c9 100644 --- a/layouts/partials/tabler-icons/linkedin.svg +++ b/layouts/partials/tabler-icons/linkedin.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/mastodon.svg b/layouts/partials/tabler-icons/mastodon.svg index 972d80b..d3dd2e2 100644 --- a/layouts/partials/tabler-icons/mastodon.svg +++ b/layouts/partials/tabler-icons/mastodon.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/medium.svg b/layouts/partials/tabler-icons/medium.svg index 0960909..35c7a76 100644 --- a/layouts/partials/tabler-icons/medium.svg +++ b/layouts/partials/tabler-icons/medium.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/netease-music.svg b/layouts/partials/tabler-icons/netease-music.svg index 3d2da67..42a08f9 100644 --- a/layouts/partials/tabler-icons/netease-music.svg +++ b/layouts/partials/tabler-icons/netease-music.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/notion.svg b/layouts/partials/tabler-icons/notion.svg index e3d0e19..bd5ccae 100644 --- a/layouts/partials/tabler-icons/notion.svg +++ b/layouts/partials/tabler-icons/notion.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/patreon.svg b/layouts/partials/tabler-icons/patreon.svg index bfbb0c2..db2ee03 100644 --- a/layouts/partials/tabler-icons/patreon.svg +++ b/layouts/partials/tabler-icons/patreon.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/qq.svg b/layouts/partials/tabler-icons/qq.svg index b7d7481..723b634 100644 --- a/layouts/partials/tabler-icons/qq.svg +++ b/layouts/partials/tabler-icons/qq.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/reddit.svg b/layouts/partials/tabler-icons/reddit.svg index 8e7dbe3..bfb08a6 100644 --- a/layouts/partials/tabler-icons/reddit.svg +++ b/layouts/partials/tabler-icons/reddit.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/rss.svg b/layouts/partials/tabler-icons/rss.svg index 7751556..b066d73 100644 --- a/layouts/partials/tabler-icons/rss.svg +++ b/layouts/partials/tabler-icons/rss.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/skype.svg b/layouts/partials/tabler-icons/skype.svg index 05a0bde..209690a 100644 --- a/layouts/partials/tabler-icons/skype.svg +++ b/layouts/partials/tabler-icons/skype.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/slack.svg b/layouts/partials/tabler-icons/slack.svg index 6690195..6867bf7 100644 --- a/layouts/partials/tabler-icons/slack.svg +++ b/layouts/partials/tabler-icons/slack.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/snapchat.svg b/layouts/partials/tabler-icons/snapchat.svg index 3b33e3f..de8a3b4 100644 --- a/layouts/partials/tabler-icons/snapchat.svg +++ b/layouts/partials/tabler-icons/snapchat.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/soundcloud.svg b/layouts/partials/tabler-icons/soundcloud.svg index fd0929c..b60384a 100644 --- a/layouts/partials/tabler-icons/soundcloud.svg +++ b/layouts/partials/tabler-icons/soundcloud.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/spotify.svg b/layouts/partials/tabler-icons/spotify.svg index d7a6f29..bde7861 100644 --- a/layouts/partials/tabler-icons/spotify.svg +++ b/layouts/partials/tabler-icons/spotify.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/steam.svg b/layouts/partials/tabler-icons/steam.svg index 1cda320..cc2d5ba 100644 --- a/layouts/partials/tabler-icons/steam.svg +++ b/layouts/partials/tabler-icons/steam.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/teams.svg b/layouts/partials/tabler-icons/teams.svg index e48abb4..856d2cc 100644 --- a/layouts/partials/tabler-icons/teams.svg +++ b/layouts/partials/tabler-icons/teams.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/telegram.svg b/layouts/partials/tabler-icons/telegram.svg index 113242f..6268abc 100644 --- a/layouts/partials/tabler-icons/telegram.svg +++ b/layouts/partials/tabler-icons/telegram.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/theme-dark.svg b/layouts/partials/tabler-icons/theme-dark.svg index ec6ba71..4a4c34e 100644 --- a/layouts/partials/tabler-icons/theme-dark.svg +++ b/layouts/partials/tabler-icons/theme-dark.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/theme-light.svg b/layouts/partials/tabler-icons/theme-light.svg index 9902622..0b85222 100644 --- a/layouts/partials/tabler-icons/theme-light.svg +++ b/layouts/partials/tabler-icons/theme-light.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/tiktok.svg b/layouts/partials/tabler-icons/tiktok.svg index d5c6d2e..8b1cbce 100644 --- a/layouts/partials/tabler-icons/tiktok.svg +++ b/layouts/partials/tabler-icons/tiktok.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/tinder.svg b/layouts/partials/tabler-icons/tinder.svg index 129c7be..b88c37d 100644 --- a/layouts/partials/tabler-icons/tinder.svg +++ b/layouts/partials/tabler-icons/tinder.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/tumblr.svg b/layouts/partials/tabler-icons/tumblr.svg index 531c44e..732041a 100644 --- a/layouts/partials/tabler-icons/tumblr.svg +++ b/layouts/partials/tabler-icons/tumblr.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/twitch.svg b/layouts/partials/tabler-icons/twitch.svg index 9f13c36..35137d4 100644 --- a/layouts/partials/tabler-icons/twitch.svg +++ b/layouts/partials/tabler-icons/twitch.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/twitter.svg b/layouts/partials/tabler-icons/twitter.svg index 81650b7..b34146c 100644 --- a/layouts/partials/tabler-icons/twitter.svg +++ b/layouts/partials/tabler-icons/twitter.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/vk.svg b/layouts/partials/tabler-icons/vk.svg index 7d057fd..99cca62 100644 --- a/layouts/partials/tabler-icons/vk.svg +++ b/layouts/partials/tabler-icons/vk.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/weibo.svg b/layouts/partials/tabler-icons/weibo.svg index 88fbba6..378cfa6 100644 --- a/layouts/partials/tabler-icons/weibo.svg +++ b/layouts/partials/tabler-icons/weibo.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/x.svg b/layouts/partials/tabler-icons/x.svg index 0feee2b..d370aca 100644 --- a/layouts/partials/tabler-icons/x.svg +++ b/layouts/partials/tabler-icons/x.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/youtube.svg b/layouts/partials/tabler-icons/youtube.svg index 2f996cf..7037486 100644 --- a/layouts/partials/tabler-icons/youtube.svg +++ b/layouts/partials/tabler-icons/youtube.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/tabler-icons/zhihu.svg b/layouts/partials/tabler-icons/zhihu.svg index 78c6236..72a04e3 100644 --- a/layouts/partials/tabler-icons/zhihu.svg +++ b/layouts/partials/tabler-icons/zhihu.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/layouts/partials/theme-switcher.html b/layouts/partials/theme-switcher.html index 4614a57..647e053 100644 --- a/layouts/partials/theme-switcher.html +++ b/layouts/partials/theme-switcher.html @@ -23,7 +23,7 @@ let currentTheme let switchButton let autoDefinedScheme = window.matchMedia('(prefers-color-scheme: dark)') - + function switchTheme(e) { currentTheme = (currentTheme === 'dark') ? 'light' : 'dark'; if (localStorage) localStorage.setItem(STORAGE_KEY, currentTheme); @@ -31,7 +31,7 @@ changeGiscusTheme(currentTheme); document.body.dispatchEvent(new CustomEvent(currentTheme + "-theme-set")); } - + const autoChangeScheme = e => { currentTheme = e.matches ? 'dark' : 'light' document.documentElement.setAttribute('data-theme', currentTheme); @@ -42,14 +42,14 @@ document.addEventListener('DOMContentLoaded', function () { switchButton = document.querySelector('.theme-switcher') currentTheme = detectCurrentScheme() - + if (currentTheme === 'auto') { autoChangeScheme(autoDefinedScheme); autoDefinedScheme.addListener(autoChangeScheme); } else { document.documentElement.setAttribute('data-theme', currentTheme) } - + if (switchButton) { switchButton.addEventListener('click', switchTheme, false) } @@ -72,13 +72,13 @@ document.body.style.opacity = 1; } - function changeGiscusTheme (theme) { + function changeGiscusTheme (theme) { function sendMessage(message) { const iframe = document.querySelector('iframe.giscus-frame'); if (!iframe) return; iframe.contentWindow.postMessage({ giscus: message }, 'https://giscus.app'); } - + sendMessage({ setConfig: { theme: theme @@ -86,4 +86,4 @@ }); } -{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html index 66f8075..429c9ee 100644 --- a/layouts/partials/toc.html +++ b/layouts/partials/toc.html @@ -1,7 +1,7 @@ -{{ $toc := and ($.Site.Params.toc) (ge .WordCount $.Site.Params.tocWordCount) }} -{{ if isset .Params "toc" }} +{{ $toc := and ($.Site.Params.toc) (ge .WordCount $.Site.Params.tocWordCount) }} +{{ if isset .Params "toc" }} {{ $toc = .Params.toc }} -{{ end }} +{{ end }} {{ if $toc }} diff --git a/layouts/partials/utterances.html b/layouts/partials/utterances.html index 1c633a7..551488b 100644 --- a/layouts/partials/utterances.html +++ b/layouts/partials/utterances.html @@ -8,4 +8,4 @@ issue-term="{{ $issue }}" crossorigin="anonymous" async> - \ No newline at end of file + diff --git a/layouts/shortcodes/video.html b/layouts/shortcodes/video.html index c950670..d69e45d 100644 --- a/layouts/shortcodes/video.html +++ b/layouts/shortcodes/video.html @@ -1,10 +1,10 @@ -