diff --git a/README.md b/README.md index 37a3a94..5391b9b 100644 --- a/README.md +++ b/README.md @@ -4,96 +4,4 @@ ## Thanks -**Hugo**: -[https://gohugo.io/](https://gohugo.io/) - -**PaperMod**: -[https://github.com/adityatelange/hugo-PaperMod/](https://github.com/adityatelange/hugo-PaperMod/) - -**instant.page**: -[https://instant.page/](https://instant.page/) - -**GitHub Pages**: -[https://pages.github.com/](https://pages.github.com/) - -**GoatCounter**: -[https://www.goatcounter.com/](https://www.goatcounter.com/) - -**Google Forms**: -[https://www.google.com/intl/ja_jp/forms/about/](https://www.google.com/intl/ja_jp/forms/about/) - -Maybe inspired: - -Show related posts: -[https://github.com/adityatelange/hugo-PaperMod/pull/1049](https://github.com/adityatelange/hugo-PaperMod/pull/1049) - -Adding a render-link hook: -[https://github.com/adityatelange/hugo-PaperMod/discussions/542](https://github.com/adityatelange/hugo-PaperMod/discussions/542) - -Add margin top to certain single elements surrounded by code blocks for consistency: -[https://github.com/adityatelange/hugo-PaperMod/pull/1128/](https://github.com/adityatelange/hugo-PaperMod/pull/1128/) - -fix: Adjust margin-bottom in nested lists: -[https://github.com/adityatelange/hugo-PaperMod/pull/1284](https://github.com/adityatelange/hugo-PaperMod/pull/1284) - -Magnific Image Pop-Up Modal for Hugo: -[https://gist.github.com/zjeaton/0cdd7e4bed9d292ab6f3d76b0369f16d](https://gist.github.com/zjeaton/0cdd7e4bed9d292ab6f3d76b0369f16d) - -Modal Image Pop-up: -[https://compassionate-feynman-1e69e9.netlify.app/modal/](https://compassionate-feynman-1e69e9.netlify.app/modal/) - -Hugoの画像を自動で圧縮する方法: -[https://kakudo.org/blog/auto-image-compression-in-hugo/](https://kakudo.org/blog/auto-image-compression-in-hugo/) - -Overview of Hugo/PaperMod, modifying PaperMod, and comparison to al-folio: -[https://jessewei.dev/blog/2023/papermod/](https://jessewei.dev/blog/2023/papermod/) - -オッズに合う - Hugo: -[https://joni.jp/categories/hugo/](https://joni.jp/categories/hugo/) - -アロハル - Hugo: -[https://aloha-ru.com/hugo/](https://aloha-ru.com/hugo/) - -k-kaz が Hugo で遊ぶサイト: -[https://k-kaz-git.github.io/](https://k-kaz-git.github.io/) - -mokuzine.net - hugo: -[https://mokuzine.net/tags/hugo/](https://mokuzine.net/tags/hugo/) - -まくまく Hugo ノート: -[https://maku77.github.io/hugo/](https://maku77.github.io/hugo/) - -ひよこまめ Hugo: -[https://blog.chick-p.work/tags/hugo](https://blog.chick-p.work/tags/hugo) - -Nelis Oostens - Hugo: -[https://oostens.me/posts/hugo/](https://oostens.me/posts/hugo/) - -hugo-PaperModX: -[https://github.com/reorx/hugo-PaperModX](https://github.com/reorx/hugo-PaperModX) - -hugo-WonderMod: -[https://github.com/Wonderfall/hugo-WonderMod](https://github.com/Wonderfall/hugo-WonderMod) - -hugo-BurgerMod: -[https://github.com/mylesagray/hugo-BurgerMod](https://github.com/mylesagray/hugo-BurgerMod) - -hugo-shortcode-roneo-collection: -[https://github.com/RoneoOrg/hugo-shortcode-roneo-collection](https://github.com/RoneoOrg/hugo-shortcode-roneo-collection) - -hugo-plus: -[https://github.com/H4tch/hugo-plus](https://github.com/H4tch/hugo-plus) - -hugo-modules: -[https://github.com/gethugothemes/hugo-modules](https://github.com/gethugothemes/hugo-modules) - -hugo-leaflet: -[https://github.com/altrdev/hugo-leaflet](https://github.com/altrdev/hugo-leaflet) - -hugo-video: -[https://github.com/martignoni/hugo-video](https://github.com/martignoni/hugo-video) - -hugo-cloak-email: -[https://github.com/martignoni/hugo-cloak-email](https://github.com/martignoni/hugo-cloak-email) - -In addition, many others, all dependency, thanks! +[https://hidegonsan.github.io/blog/pages/thanks/](https://hidegonsan.github.io/blog/pages/thanks/) diff --git a/content/pages/thanks/_index.md b/content/pages/thanks/_index.md index ac040c3..a8c6cc5 100644 --- a/content/pages/thanks/_index.md +++ b/content/pages/thanks/_index.md @@ -21,18 +21,21 @@ ShowBreadCrumbs: false **PaperMod**: [https://github.com/adityatelange/hugo-PaperMod/](https://github.com/adityatelange/hugo-PaperMod/) +**GitHub Pages**: +[https://pages.github.com/](https://pages.github.com/) + +**GoatCounter**: +[https://www.goatcounter.com/](https://www.goatcounter.com/) + **instant.page**: [https://instant.page/](https://instant.page/) -**GitHub Pages**: -[https://pages.github.com/](https://pages.github.com/) +**KaTeX**: +[https://katex.org/](https://katex.org/) -**GoatCounter**: -[https://www.goatcounter.com/](https://www.goatcounter.com/) - **Google Forms**: [https://www.google.com/intl/ja_jp/forms/about/](https://www.google.com/intl/ja_jp/forms/about/) @@ -59,6 +62,9 @@ Modal Image Pop-up: Hugoの画像を自動で圧縮する方法: [https://kakudo.org/blog/auto-image-compression-in-hugo/](https://kakudo.org/blog/auto-image-compression-in-hugo/) +Hugo でエスケープの問題を回避しつつ KaTeX を使う: +[https://www.oshikiri.org/posts/use-katex-in-hugo/](https://www.oshikiri.org/posts/use-katex-in-hugo/) + Overview of Hugo/PaperMod, modifying PaperMod, and comparison to al-folio: [https://jessewei.dev/blog/2023/papermod/](https://jessewei.dev/blog/2023/papermod/) diff --git a/layouts/partials/extend_head.html b/layouts/partials/extend_head.html index 273de71..9dee6b6 100644 --- a/layouts/partials/extend_head.html +++ b/layouts/partials/extend_head.html @@ -1,5 +1,7 @@ {{- partialCached "head/goatcounter.html" . -}} +{{- partial "head/katex.html" . -}} + {{- partial "head/seo.html" . -}} {{/* {{- partialCached "head/anti_adblock.html" . -}} */}} diff --git a/layouts/partials/head/katex.html b/layouts/partials/head/katex.html new file mode 100644 index 0000000..6099165 --- /dev/null +++ b/layouts/partials/head/katex.html @@ -0,0 +1,76 @@ + +{{- if or (.Params.katex) (.Params.mhchem) -}} + + {{- $katex_license_body := "/*\nSPDX-License-Identifier: MIT\nLicensed under the MIT license.\nhttps://github.com/KaTeX/KaTeX/blob/main/LICENSE\nhttps://opensource.org/license/mit/\n*/\n" -}} + {{- $katex_license_css := $katex_license_body | resources.FromString "css/katex_license.css" -}} + {{- $katex_license_js := $katex_license_body | resources.FromString "js/katex_license.js" -}} + + {{- with (slice $katex_license_css (resources.Get "css/katex/katex.min.css")) | resources.Concat "assets/css/katex.min.css" | fingerprint -}} + + {{- end -}} + + {{- with (slice $katex_license_js (resources.Get "js/katex/katex.min.js")) | resources.Concat "assets/js/katex/katex.min.js" | fingerprint -}} + + {{- end -}} + + {{- with (slice $katex_license_js (resources.Get "js/katex/contrib/auto-render.min.js")) | resources.Concat "assets/js/katex/contrib/auto-render.min.js" | fingerprint -}} + + {{- end -}} + + {{- with (slice $katex_license_js (resources.Get "js/katex/contrib/copy-tex.min.js")) | resources.Concat "assets/js/katex/contrib/copy-tex.min.js" | fingerprint -}} + + {{- end -}} + + {{- if .Params.mhchem -}} + {{- with (slice $katex_license_js (resources.Get "js/katex/contrib/mhchem.min.js")) | resources.Concat "assets/js/katex/contrib/mhchem.min.js" | fingerprint -}} + + {{- end -}} + {{- end -}} + + + +{{- end -}} diff --git a/layouts/shortcodes/katex.html b/layouts/shortcodes/katex.html new file mode 100644 index 0000000..fd9b855 --- /dev/null +++ b/layouts/shortcodes/katex.html @@ -0,0 +1,7 @@ +{{- if eq (.Get 0) "display" -}} +

{{ trim .Inner "\n\r" }}

+{{- else if eq (.Get 0) "inline" -}} + {{ trim .Inner "\n\r" }} +{{- else -}} +

{{ trim .Inner "\n\r" }}

+{{- end -}}