From b8d5bcf99c03bcf3eba3ba3d47b4949e6a57300d Mon Sep 17 00:00:00 2001 From: JamesFlare1212 Date: Wed, 26 Apr 2023 22:15:15 +0800 Subject: [PATCH 1/3] remove-submodules --- .gitmodules | 3 --- content.zh/docs/学术资源/学科在线资源/_index.md | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 12744dd..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "themes/hugo-book"] - path = themes/hugo-book - url = https://github.com/alex-shpak/hugo-book diff --git a/content.zh/docs/学术资源/学科在线资源/_index.md b/content.zh/docs/学术资源/学科在线资源/_index.md index a938df8..c3dd062 100644 --- a/content.zh/docs/学术资源/学科在线资源/_index.md +++ b/content.zh/docs/学术资源/学科在线资源/_index.md @@ -62,15 +62,15 @@ bookCollapseSection: true - Boven Jiang -### 物理 -- Derrick Jiang - ### 经济 - Tobby Xu <---> +### 物理 +- Derrick Jiang + ### 开发 - [James Zhou](https://jamesflare.com) From 0d2ffd04473b96a8a20eaa2a75e02b954765d817 Mon Sep 17 00:00:00 2001 From: JamesFlare1212 <107359951+JamesFlare1212@users.noreply.github.com> Date: Wed, 26 Apr 2023 22:19:11 +0800 Subject: [PATCH 2/3] Delete themes directory --- themes/hugo-book | 1 - 1 file changed, 1 deletion(-) delete mode 160000 themes/hugo-book diff --git a/themes/hugo-book b/themes/hugo-book deleted file mode 160000 index d5b75f4..0000000 --- a/themes/hugo-book +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d5b75f4fb3aaa5c2f0209db4933a55aa634d5dfd From c6ca9d6524ca11345ec309086c95ccb125eda0f2 Mon Sep 17 00:00:00 2001 From: JamesFlare1212 Date: Wed, 26 Apr 2023 22:19:59 +0800 Subject: [PATCH 3/3] hugo-book --- themes/hugo-book/.gitignore | 4 + themes/hugo-book/LICENSE | 20 + themes/hugo-book/README.md | 358 +++++ themes/hugo-book/archetypes/docs.md | 10 + themes/hugo-book/archetypes/posts.md | 6 + themes/hugo-book/assets/_custom.scss | 3 + themes/hugo-book/assets/_defaults.scss | 66 + themes/hugo-book/assets/_fonts.scss | 39 + themes/hugo-book/assets/_main.scss | 364 +++++ themes/hugo-book/assets/_markdown.scss | 197 +++ themes/hugo-book/assets/_print.scss | 17 + themes/hugo-book/assets/_shortcodes.scss | 104 ++ themes/hugo-book/assets/_utils.scss | 92 ++ themes/hugo-book/assets/_variables.scss | 3 + themes/hugo-book/assets/book.scss | 15 + themes/hugo-book/assets/clipboard.js | 24 + themes/hugo-book/assets/manifest.json | 15 + themes/hugo-book/assets/menu-reset.js | 7 + themes/hugo-book/assets/mermaid.json | 6 + themes/hugo-book/assets/normalize.css | 349 +++++ .../hugo-book/assets/plugins/_numbered.scss | 36 + .../hugo-book/assets/plugins/_scrollbars.scss | 26 + themes/hugo-book/assets/search-data.json | 17 + themes/hugo-book/assets/search.js | 104 ++ themes/hugo-book/assets/sw-register.js | 7 + themes/hugo-book/assets/sw.js | 55 + themes/hugo-book/assets/themes/_auto.scss | 9 + themes/hugo-book/assets/themes/_dark.scss | 3 + themes/hugo-book/assets/themes/_light.scss | 3 + .../hugo-book/exampleSite/assets/_custom.scss | 4 + .../exampleSite/assets/_variables.scss | 1 + themes/hugo-book/exampleSite/config.toml | 118 ++ themes/hugo-book/exampleSite/config.yaml | 114 ++ .../exampleSite/content.bn/_index.md | 79 + .../exampleSite/content.en/_index.md | 41 + .../content.en/docs/example/_index.md | 71 + .../example/collapsed/3rd-level/4th-level.md | 12 + .../example/collapsed/3rd-level/_index.md | 26 + .../docs/example/collapsed/_index.md | 4 + .../content.en/docs/example/hidden.md | 52 + .../docs/example/table-of-contents/_index.md | 85 ++ .../example/table-of-contents/with-toc.md | 64 + .../example/table-of-contents/without-toc.md | 59 + .../content.en/docs/shortcodes/_index.md | 3 + .../content.en/docs/shortcodes/buttons.md | 13 + .../content.en/docs/shortcodes/columns.md | 45 + .../content.en/docs/shortcodes/details.md | 22 + .../content.en/docs/shortcodes/expand.md | 35 + .../content.en/docs/shortcodes/hints.md | 32 + .../content.en/docs/shortcodes/katex.md | 28 + .../content.en/docs/shortcodes/mermaid.md | 41 + .../docs/shortcodes/section/_index.md | 15 + .../docs/shortcodes/section/first-page.md | 6 + .../docs/shortcodes/section/second-page.md | 6 + .../content.en/docs/shortcodes/tabs.md | 50 + .../exampleSite/content.en/menu/index.md | 22 + .../exampleSite/content.en/posts/_index.md | 7 + .../content.en/posts/creating-a-new-theme.md | 1150 +++++++++++++++ .../content.en/posts/goisforlovers.md | 344 +++++ .../content.en/posts/hugoisforlovers.md | 89 ++ .../content.en/posts/migrate-from-jekyll.md | 156 ++ .../exampleSite/content.ru/_index.md | 79 + .../exampleSite/content.zh/_index.md | 79 + ...s_e129fe35b8d0a70789c8a08429469073.content | 1 + ...scss_e129fe35b8d0a70789c8a08429469073.json | 1 + themes/hugo-book/go.mod | 3 + themes/hugo-book/i18n/am.yaml | 14 + themes/hugo-book/i18n/bn.yaml | 14 + themes/hugo-book/i18n/cn.yaml | 21 + themes/hugo-book/i18n/cs.yaml | 14 + themes/hugo-book/i18n/de.yaml | 14 + themes/hugo-book/i18n/en.yaml | 14 + themes/hugo-book/i18n/es.yaml | 14 + themes/hugo-book/i18n/fa.yaml | 20 + themes/hugo-book/i18n/fr.yaml | 14 + themes/hugo-book/i18n/it.yaml | 14 + themes/hugo-book/i18n/ja.yaml | 20 + themes/hugo-book/i18n/jp.yaml | 21 + themes/hugo-book/i18n/ko.yaml | 20 + themes/hugo-book/i18n/nb.yaml | 14 + themes/hugo-book/i18n/pt.yaml | 14 + themes/hugo-book/i18n/ru.yaml | 14 + themes/hugo-book/i18n/sv.yaml | 14 + themes/hugo-book/i18n/tr.yaml | 14 + themes/hugo-book/i18n/uk.yaml | 14 + themes/hugo-book/i18n/zh-TW.yaml | 20 + themes/hugo-book/i18n/zh.yaml | 20 + themes/hugo-book/images/screenshot.png | Bin 0 -> 189080 bytes themes/hugo-book/images/tn.png | Bin 0 -> 195683 bytes themes/hugo-book/layouts/404.html | 34 + .../_default/_markup/render-heading.html | 4 + .../_default/_markup/render-image.html | 19 + .../layouts/_default/_markup/render-link.html | 28 + themes/hugo-book/layouts/_default/baseof.html | 83 ++ themes/hugo-book/layouts/_default/list.html | 1 + themes/hugo-book/layouts/_default/single.html | 1 + .../layouts/partials/docs/brand.html | 8 + .../layouts/partials/docs/comments.html | 2 + .../hugo-book/layouts/partials/docs/date.html | 6 + .../layouts/partials/docs/footer.html | 28 + .../layouts/partials/docs/header.html | 13 + .../partials/docs/html-head-title.html | 1 + .../layouts/partials/docs/html-head.html | 55 + .../layouts/partials/docs/inject/body.html | 0 .../partials/docs/inject/content-after.html | 0 .../partials/docs/inject/content-before.html | 0 .../layouts/partials/docs/inject/footer.html | 0 .../layouts/partials/docs/inject/head.html | 0 .../partials/docs/inject/menu-after.html | 0 .../partials/docs/inject/menu-before.html | 0 .../partials/docs/inject/toc-after.html | 0 .../partials/docs/inject/toc-before.html | 0 .../layouts/partials/docs/languages.html | 33 + .../layouts/partials/docs/menu-bundle.html | 5 + .../layouts/partials/docs/menu-filetree.html | 49 + .../layouts/partials/docs/menu-hugo.html | 28 + .../hugo-book/layouts/partials/docs/menu.html | 25 + .../layouts/partials/docs/post-meta.html | 23 + .../layouts/partials/docs/search.html | 7 + .../layouts/partials/docs/taxonomy.html | 19 + .../layouts/partials/docs/title.html | 17 + .../hugo-book/layouts/partials/docs/toc.html | 3 + themes/hugo-book/layouts/posts/list.html | 22 + themes/hugo-book/layouts/posts/single.html | 13 + .../hugo-book/layouts/shortcodes/button.html | 12 + .../hugo-book/layouts/shortcodes/columns.html | 7 + .../hugo-book/layouts/shortcodes/details.html | 7 + .../hugo-book/layouts/shortcodes/expand.html | 13 + themes/hugo-book/layouts/shortcodes/hint.html | 3 + .../hugo-book/layouts/shortcodes/katex.html | 13 + .../hugo-book/layouts/shortcodes/mermaid.html | 12 + .../hugo-book/layouts/shortcodes/section.html | 10 + themes/hugo-book/layouts/shortcodes/tab.html | 12 + themes/hugo-book/layouts/shortcodes/tabs.html | 15 + themes/hugo-book/layouts/taxonomy/list.html | 13 + .../hugo-book/layouts/taxonomy/taxonomy.html | 22 + themes/hugo-book/static/favicon.png | Bin 0 -> 109 bytes themes/hugo-book/static/favicon.svg | 1 + themes/hugo-book/static/flexsearch.min.js | 42 + .../fonts/roboto-mono-v13-latin-regular.woff | Bin 0 -> 15160 bytes .../fonts/roboto-mono-v13-latin-regular.woff2 | Bin 0 -> 12312 bytes .../static/fonts/roboto-v27-latin-700.woff | Bin 0 -> 20396 bytes .../static/fonts/roboto-v27-latin-700.woff2 | Bin 0 -> 15828 bytes .../fonts/roboto-v27-latin-regular.woff | Bin 0 -> 20332 bytes .../fonts/roboto-v27-latin-regular.woff2 | Bin 0 -> 15688 bytes .../hugo-book/static/katex/auto-render.min.js | 1 + .../static/katex/fonts/KaTeX_AMS-Regular.ttf | Bin 0 -> 70972 bytes .../static/katex/fonts/KaTeX_AMS-Regular.woff | Bin 0 -> 38868 bytes .../katex/fonts/KaTeX_AMS-Regular.woff2 | Bin 0 -> 32944 bytes .../katex/fonts/KaTeX_Caligraphic-Bold.ttf | Bin 0 -> 19316 bytes .../katex/fonts/KaTeX_Caligraphic-Bold.woff | Bin 0 -> 11696 bytes .../katex/fonts/KaTeX_Caligraphic-Bold.woff2 | Bin 0 -> 10448 bytes .../katex/fonts/KaTeX_Caligraphic-Regular.ttf | Bin 0 -> 18684 bytes .../fonts/KaTeX_Caligraphic-Regular.woff | Bin 0 -> 11460 bytes .../fonts/KaTeX_Caligraphic-Regular.woff2 | Bin 0 -> 10240 bytes .../static/katex/fonts/KaTeX_Fraktur-Bold.ttf | Bin 0 -> 35660 bytes .../katex/fonts/KaTeX_Fraktur-Bold.woff | Bin 0 -> 22632 bytes .../katex/fonts/KaTeX_Fraktur-Bold.woff2 | Bin 0 -> 20360 bytes .../katex/fonts/KaTeX_Fraktur-Regular.ttf | Bin 0 -> 34352 bytes .../katex/fonts/KaTeX_Fraktur-Regular.woff | Bin 0 -> 22088 bytes .../katex/fonts/KaTeX_Fraktur-Regular.woff2 | Bin 0 -> 19784 bytes .../static/katex/fonts/KaTeX_Main-Bold.ttf | Bin 0 -> 60784 bytes .../static/katex/fonts/KaTeX_Main-Bold.woff | Bin 0 -> 35464 bytes .../static/katex/fonts/KaTeX_Main-Bold.woff2 | Bin 0 -> 30244 bytes .../katex/fonts/KaTeX_Main-BoldItalic.ttf | Bin 0 -> 44496 bytes .../katex/fonts/KaTeX_Main-BoldItalic.woff | Bin 0 -> 25352 bytes .../katex/fonts/KaTeX_Main-BoldItalic.woff2 | Bin 0 -> 21944 bytes .../static/katex/fonts/KaTeX_Main-Italic.ttf | Bin 0 -> 47640 bytes .../static/katex/fonts/KaTeX_Main-Italic.woff | Bin 0 -> 26228 bytes .../katex/fonts/KaTeX_Main-Italic.woff2 | Bin 0 -> 22748 bytes .../static/katex/fonts/KaTeX_Main-Regular.ttf | Bin 0 -> 69520 bytes .../katex/fonts/KaTeX_Main-Regular.woff | Bin 0 -> 38112 bytes .../katex/fonts/KaTeX_Main-Regular.woff2 | Bin 0 -> 32464 bytes .../katex/fonts/KaTeX_Math-BoldItalic.ttf | Bin 0 -> 39308 bytes .../katex/fonts/KaTeX_Math-BoldItalic.woff | Bin 0 -> 22324 bytes .../katex/fonts/KaTeX_Math-BoldItalic.woff2 | Bin 0 -> 19720 bytes .../static/katex/fonts/KaTeX_Math-Italic.ttf | Bin 0 -> 40992 bytes .../static/katex/fonts/KaTeX_Math-Italic.woff | Bin 0 -> 22844 bytes .../katex/fonts/KaTeX_Math-Italic.woff2 | Bin 0 -> 20096 bytes .../katex/fonts/KaTeX_SansSerif-Bold.ttf | Bin 0 -> 33688 bytes .../katex/fonts/KaTeX_SansSerif-Bold.woff | Bin 0 -> 18516 bytes .../katex/fonts/KaTeX_SansSerif-Bold.woff2 | Bin 0 -> 15732 bytes .../katex/fonts/KaTeX_SansSerif-Italic.ttf | Bin 0 -> 30960 bytes .../katex/fonts/KaTeX_SansSerif-Italic.woff | Bin 0 -> 17572 bytes .../katex/fonts/KaTeX_SansSerif-Italic.woff2 | Bin 0 -> 15024 bytes .../katex/fonts/KaTeX_SansSerif-Regular.ttf | Bin 0 -> 29812 bytes .../katex/fonts/KaTeX_SansSerif-Regular.woff | Bin 0 -> 16228 bytes .../katex/fonts/KaTeX_SansSerif-Regular.woff2 | Bin 0 -> 13708 bytes .../katex/fonts/KaTeX_Script-Regular.ttf | Bin 0 -> 24620 bytes .../katex/fonts/KaTeX_Script-Regular.woff | Bin 0 -> 13428 bytes .../katex/fonts/KaTeX_Script-Regular.woff2 | Bin 0 -> 12064 bytes .../katex/fonts/KaTeX_Size1-Regular.ttf | Bin 0 -> 12916 bytes .../katex/fonts/KaTeX_Size1-Regular.woff | Bin 0 -> 6696 bytes .../katex/fonts/KaTeX_Size1-Regular.woff2 | Bin 0 -> 5592 bytes .../katex/fonts/KaTeX_Size2-Regular.ttf | Bin 0 -> 12172 bytes .../katex/fonts/KaTeX_Size2-Regular.woff | Bin 0 -> 6436 bytes .../katex/fonts/KaTeX_Size2-Regular.woff2 | Bin 0 -> 5392 bytes .../katex/fonts/KaTeX_Size3-Regular.ttf | Bin 0 -> 8120 bytes .../katex/fonts/KaTeX_Size3-Regular.woff | Bin 0 -> 4568 bytes .../katex/fonts/KaTeX_Size3-Regular.woff2 | Bin 0 -> 3728 bytes .../katex/fonts/KaTeX_Size4-Regular.ttf | Bin 0 -> 11016 bytes .../katex/fonts/KaTeX_Size4-Regular.woff | Bin 0 -> 6184 bytes .../katex/fonts/KaTeX_Size4-Regular.woff2 | Bin 0 -> 5028 bytes .../katex/fonts/KaTeX_Typewriter-Regular.ttf | Bin 0 -> 35924 bytes .../katex/fonts/KaTeX_Typewriter-Regular.woff | Bin 0 -> 20260 bytes .../fonts/KaTeX_Typewriter-Regular.woff2 | Bin 0 -> 17272 bytes themes/hugo-book/static/katex/katex.min.css | 1 + themes/hugo-book/static/katex/katex.min.js | 1 + themes/hugo-book/static/mermaid.min.js | 1280 +++++++++++++++++ themes/hugo-book/static/svg/calendar.svg | 1 + themes/hugo-book/static/svg/edit.svg | 1 + themes/hugo-book/static/svg/menu.svg | 1 + themes/hugo-book/static/svg/toc.svg | 1 + themes/hugo-book/static/svg/translate.svg | 1 + themes/hugo-book/theme.toml | 16 + 215 files changed, 7267 insertions(+) create mode 100644 themes/hugo-book/.gitignore create mode 100644 themes/hugo-book/LICENSE create mode 100644 themes/hugo-book/README.md create mode 100644 themes/hugo-book/archetypes/docs.md create mode 100644 themes/hugo-book/archetypes/posts.md create mode 100644 themes/hugo-book/assets/_custom.scss create mode 100644 themes/hugo-book/assets/_defaults.scss create mode 100644 themes/hugo-book/assets/_fonts.scss create mode 100644 themes/hugo-book/assets/_main.scss create mode 100644 themes/hugo-book/assets/_markdown.scss create mode 100644 themes/hugo-book/assets/_print.scss create mode 100644 themes/hugo-book/assets/_shortcodes.scss create mode 100644 themes/hugo-book/assets/_utils.scss create mode 100644 themes/hugo-book/assets/_variables.scss create mode 100644 themes/hugo-book/assets/book.scss create mode 100644 themes/hugo-book/assets/clipboard.js create mode 100644 themes/hugo-book/assets/manifest.json create mode 100644 themes/hugo-book/assets/menu-reset.js create mode 100644 themes/hugo-book/assets/mermaid.json create mode 100644 themes/hugo-book/assets/normalize.css create mode 100644 themes/hugo-book/assets/plugins/_numbered.scss create mode 100644 themes/hugo-book/assets/plugins/_scrollbars.scss create mode 100644 themes/hugo-book/assets/search-data.json create mode 100644 themes/hugo-book/assets/search.js create mode 100644 themes/hugo-book/assets/sw-register.js create mode 100644 themes/hugo-book/assets/sw.js create mode 100644 themes/hugo-book/assets/themes/_auto.scss create mode 100644 themes/hugo-book/assets/themes/_dark.scss create mode 100644 themes/hugo-book/assets/themes/_light.scss create mode 100644 themes/hugo-book/exampleSite/assets/_custom.scss create mode 100644 themes/hugo-book/exampleSite/assets/_variables.scss create mode 100644 themes/hugo-book/exampleSite/config.toml create mode 100644 themes/hugo-book/exampleSite/config.yaml create mode 100644 themes/hugo-book/exampleSite/content.bn/_index.md create mode 100644 themes/hugo-book/exampleSite/content.en/_index.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/example/_index.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/example/collapsed/3rd-level/4th-level.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/example/collapsed/3rd-level/_index.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/example/collapsed/_index.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/example/hidden.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/example/table-of-contents/_index.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/example/table-of-contents/with-toc.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/example/table-of-contents/without-toc.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/_index.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/buttons.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/columns.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/details.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/expand.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/hints.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/katex.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/mermaid.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/section/_index.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/section/first-page.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/section/second-page.md create mode 100644 themes/hugo-book/exampleSite/content.en/docs/shortcodes/tabs.md create mode 100644 themes/hugo-book/exampleSite/content.en/menu/index.md create mode 100644 themes/hugo-book/exampleSite/content.en/posts/_index.md create mode 100644 themes/hugo-book/exampleSite/content.en/posts/creating-a-new-theme.md create mode 100644 themes/hugo-book/exampleSite/content.en/posts/goisforlovers.md create mode 100644 themes/hugo-book/exampleSite/content.en/posts/hugoisforlovers.md create mode 100644 themes/hugo-book/exampleSite/content.en/posts/migrate-from-jekyll.md create mode 100644 themes/hugo-book/exampleSite/content.ru/_index.md create mode 100644 themes/hugo-book/exampleSite/content.zh/_index.md create mode 100644 themes/hugo-book/exampleSite/resources/_gen/assets/scss/book.scss_e129fe35b8d0a70789c8a08429469073.content create mode 100644 themes/hugo-book/exampleSite/resources/_gen/assets/scss/book.scss_e129fe35b8d0a70789c8a08429469073.json create mode 100644 themes/hugo-book/go.mod create mode 100644 themes/hugo-book/i18n/am.yaml create mode 100644 themes/hugo-book/i18n/bn.yaml create mode 100644 themes/hugo-book/i18n/cn.yaml create mode 100644 themes/hugo-book/i18n/cs.yaml create mode 100644 themes/hugo-book/i18n/de.yaml create mode 100644 themes/hugo-book/i18n/en.yaml create mode 100644 themes/hugo-book/i18n/es.yaml create mode 100644 themes/hugo-book/i18n/fa.yaml create mode 100644 themes/hugo-book/i18n/fr.yaml create mode 100644 themes/hugo-book/i18n/it.yaml create mode 100644 themes/hugo-book/i18n/ja.yaml create mode 100644 themes/hugo-book/i18n/jp.yaml create mode 100644 themes/hugo-book/i18n/ko.yaml create mode 100644 themes/hugo-book/i18n/nb.yaml create mode 100644 themes/hugo-book/i18n/pt.yaml create mode 100644 themes/hugo-book/i18n/ru.yaml create mode 100644 themes/hugo-book/i18n/sv.yaml create mode 100644 themes/hugo-book/i18n/tr.yaml create mode 100644 themes/hugo-book/i18n/uk.yaml create mode 100644 themes/hugo-book/i18n/zh-TW.yaml create mode 100644 themes/hugo-book/i18n/zh.yaml create mode 100644 themes/hugo-book/images/screenshot.png create mode 100644 themes/hugo-book/images/tn.png create mode 100644 themes/hugo-book/layouts/404.html create mode 100644 themes/hugo-book/layouts/_default/_markup/render-heading.html create mode 100644 themes/hugo-book/layouts/_default/_markup/render-image.html create mode 100644 themes/hugo-book/layouts/_default/_markup/render-link.html create mode 100644 themes/hugo-book/layouts/_default/baseof.html create mode 100644 themes/hugo-book/layouts/_default/list.html create mode 100644 themes/hugo-book/layouts/_default/single.html create mode 100644 themes/hugo-book/layouts/partials/docs/brand.html create mode 100644 themes/hugo-book/layouts/partials/docs/comments.html create mode 100644 themes/hugo-book/layouts/partials/docs/date.html create mode 100644 themes/hugo-book/layouts/partials/docs/footer.html create mode 100644 themes/hugo-book/layouts/partials/docs/header.html create mode 100644 themes/hugo-book/layouts/partials/docs/html-head-title.html create mode 100644 themes/hugo-book/layouts/partials/docs/html-head.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/body.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/content-after.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/content-before.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/footer.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/head.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/menu-after.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/menu-before.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/toc-after.html create mode 100644 themes/hugo-book/layouts/partials/docs/inject/toc-before.html create mode 100644 themes/hugo-book/layouts/partials/docs/languages.html create mode 100644 themes/hugo-book/layouts/partials/docs/menu-bundle.html create mode 100644 themes/hugo-book/layouts/partials/docs/menu-filetree.html create mode 100644 themes/hugo-book/layouts/partials/docs/menu-hugo.html create mode 100644 themes/hugo-book/layouts/partials/docs/menu.html create mode 100644 themes/hugo-book/layouts/partials/docs/post-meta.html create mode 100644 themes/hugo-book/layouts/partials/docs/search.html create mode 100644 themes/hugo-book/layouts/partials/docs/taxonomy.html create mode 100644 themes/hugo-book/layouts/partials/docs/title.html create mode 100644 themes/hugo-book/layouts/partials/docs/toc.html create mode 100644 themes/hugo-book/layouts/posts/list.html create mode 100644 themes/hugo-book/layouts/posts/single.html create mode 100644 themes/hugo-book/layouts/shortcodes/button.html create mode 100644 themes/hugo-book/layouts/shortcodes/columns.html create mode 100644 themes/hugo-book/layouts/shortcodes/details.html create mode 100644 themes/hugo-book/layouts/shortcodes/expand.html create mode 100644 themes/hugo-book/layouts/shortcodes/hint.html create mode 100644 themes/hugo-book/layouts/shortcodes/katex.html create mode 100644 themes/hugo-book/layouts/shortcodes/mermaid.html create mode 100644 themes/hugo-book/layouts/shortcodes/section.html create mode 100644 themes/hugo-book/layouts/shortcodes/tab.html create mode 100644 themes/hugo-book/layouts/shortcodes/tabs.html create mode 100644 themes/hugo-book/layouts/taxonomy/list.html create mode 100644 themes/hugo-book/layouts/taxonomy/taxonomy.html create mode 100644 themes/hugo-book/static/favicon.png create mode 100644 themes/hugo-book/static/favicon.svg create mode 100644 themes/hugo-book/static/flexsearch.min.js create mode 100644 themes/hugo-book/static/fonts/roboto-mono-v13-latin-regular.woff create mode 100644 themes/hugo-book/static/fonts/roboto-mono-v13-latin-regular.woff2 create mode 100644 themes/hugo-book/static/fonts/roboto-v27-latin-700.woff create mode 100644 themes/hugo-book/static/fonts/roboto-v27-latin-700.woff2 create mode 100644 themes/hugo-book/static/fonts/roboto-v27-latin-regular.woff create mode 100644 themes/hugo-book/static/fonts/roboto-v27-latin-regular.woff2 create mode 100644 themes/hugo-book/static/katex/auto-render.min.js create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_AMS-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_AMS-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_AMS-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Bold.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Bold.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Bold.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Caligraphic-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Bold.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Bold.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Bold.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Fraktur-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-Bold.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-Bold.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-Bold.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-BoldItalic.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-BoldItalic.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-BoldItalic.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-Italic.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-Italic.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-Italic.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Main-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Math-BoldItalic.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Math-BoldItalic.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Math-BoldItalic.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Math-Italic.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Math-Italic.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Math-Italic.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Bold.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Bold.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Bold.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Italic.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Italic.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Italic.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_SansSerif-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Script-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Script-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Script-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size1-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size1-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size1-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size2-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size2-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size2-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size3-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size3-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size3-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size4-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size4-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Size4-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Typewriter-Regular.ttf create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Typewriter-Regular.woff create mode 100644 themes/hugo-book/static/katex/fonts/KaTeX_Typewriter-Regular.woff2 create mode 100644 themes/hugo-book/static/katex/katex.min.css create mode 100644 themes/hugo-book/static/katex/katex.min.js create mode 100644 themes/hugo-book/static/mermaid.min.js create mode 100644 themes/hugo-book/static/svg/calendar.svg create mode 100644 themes/hugo-book/static/svg/edit.svg create mode 100644 themes/hugo-book/static/svg/menu.svg create mode 100644 themes/hugo-book/static/svg/toc.svg create mode 100644 themes/hugo-book/static/svg/translate.svg create mode 100644 themes/hugo-book/theme.toml diff --git a/themes/hugo-book/.gitignore b/themes/hugo-book/.gitignore new file mode 100644 index 0000000..5944200 --- /dev/null +++ b/themes/hugo-book/.gitignore @@ -0,0 +1,4 @@ +public/ +exampleSite/public/ +.DS_Store +.hugo_build.lock diff --git a/themes/hugo-book/LICENSE b/themes/hugo-book/LICENSE new file mode 100644 index 0000000..e7a669a --- /dev/null +++ b/themes/hugo-book/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2018 Alex Shpak + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +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. diff --git a/themes/hugo-book/README.md b/themes/hugo-book/README.md new file mode 100644 index 0000000..be8d764 --- /dev/null +++ b/themes/hugo-book/README.md @@ -0,0 +1,358 @@ +# Hugo Book Theme + +[![Hugo](https://img.shields.io/badge/hugo-0.79-blue.svg)](https://gohugo.io) +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) +![Build with Hugo](https://github.com/alex-shpak/hugo-book/workflows/Build%20with%20Hugo/badge.svg) + +### [Hugo](https://gohugo.io) documentation theme as simple as plain book + +![Screenshot](https://github.com/alex-shpak/hugo-book/blob/master/images/screenshot.png) + +- [Features](#features) +- [Requirements](#requirements) +- [Installation](#installation) +- [Menu](#menu) +- [Blog](#blog) +- [Configuration](#configuration) +- [Shortcodes](#shortcodes) +- [Versioning](#versioning) +- [Contributing](#contributing) + +## Features + +- Clean simple design +- Light and Mobile-Friendly +- Multi-language support +- Customisable +- Zero initial configuration +- Handy shortcodes +- Comments support +- Simple blog and taxonomy +- Primary features work without JavaScript +- Dark Mode + +## Requirements + +- Hugo 0.79 or higher +- Hugo extended version, read more [here](https://gohugo.io/news/0.48-relnotes/) + +## Installation + +### Install as git submodule +Navigate to your hugo project root and run: + +``` +git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book +``` + +Then run hugo (or set `theme = "hugo-book"`/`theme: hugo-book` in configuration file) + +``` +hugo server --minify --theme hugo-book +``` + +### Install as hugo module + +You can also add this theme as a Hugo module instead of a git submodule. + +Start with initializing hugo modules, if not done yet: +``` +hugo mod init github.com/repo/path +``` + +Navigate to your hugo project root and add [module] section to your `config.toml`: + +```toml +[module] +[[module.imports]] +path = 'github.com/alex-shpak/hugo-book' +``` + +Then, to load/update the theme module and run hugo: + +```sh +hugo mod get -u +hugo server --minify +``` + +### Creating site from scratch + +Below is an example on how to create a new site from scratch: + +```sh +hugo new site mydocs; cd mydocs +git init +git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book +cp -R themes/hugo-book/exampleSite/content.en/* ./content +``` + +```sh +hugo server --minify --theme hugo-book +``` + +## Menu + +### File tree menu (default) + +By default, the theme will render pages from the `content/docs` section as a menu in a tree structure. +You can set `title` and `weight` in the front matter of pages to adjust the order and titles in the menu. + +### Leaf bundle menu (Deprecated, to be removed in June 2022) + +You can also use leaf bundle and the content of its `index.md` file as menu. +Given you have the following file structure: + +``` +├── content +│ ├── docs +│ │ ├── page-one.md +│ │ └── page-two.md +│ └── posts +│ ├── post-one.md +│ └── post-two.md +``` + +Create a file `content/menu/index.md` with the content: + +```md ++++ +headless = true ++++ + +- [Book Example]({{< relref "/docs/" >}}) + - [Page One]({{< relref "/docs/page-one" >}}) + - [Page Two]({{< relref "/docs/page-two" >}}) +- [Blog]({{< relref "/posts" >}}) +``` + +And Enable it by setting `BookMenuBundle: /menu` in Site configuration. + +- [Example menu](https://github.com/alex-shpak/hugo-book/blob/master/exampleSite/content.en/menu/index.md) +- [Example config file](https://github.com/alex-shpak/hugo-book/blob/master/exampleSite/config.yaml) +- [Leaf bundles](https://gohugo.io/content-management/page-bundles/) + +## Blog + +A simple blog is supported in the section `posts`. +A blog is not the primary usecase of this theme, so it has only minimal features. + +## Configuration + +### Site Configuration + +There are a few configuration options that you can add to your `config.toml` file. +You can also see the `yaml` example [here](https://github.com/alex-shpak/hugo-book/blob/master/exampleSite/config.yaml). + +```toml +# (Optional) Set Google Analytics if you use it to track your website. +# Always put it on the top of the configuration file, otherwise it won't work +googleAnalytics = "UA-XXXXXXXXX-X" + +# (Optional) If you provide a Disqus shortname, comments will be enabled on +# all pages. +disqusShortname = "my-site" + +# (Optional) Set this to true if you use capital letters in file names +disablePathToLower = true + +# (Optional) Set this to true to enable 'Last Modified by' date and git author +# information on 'doc' type pages. +enableGitInfo = true + +# (Optional) Theme is intended for documentation use, therefore it doesn't render taxonomy. +# You can remove related files with config below +disableKinds = ['taxonomy', 'taxonomyTerm'] + +[params] + # (Optional, default light) Sets color theme: light, dark or auto. + # Theme 'auto' switches between dark and light modes based on browser/os preferences + BookTheme = 'light' + + # (Optional, default true) Controls table of contents visibility on right side of pages. + # Start and end levels can be controlled with markup.tableOfContents setting. + # You can also specify this parameter per page in front matter. + BookToC = true + + # (Optional, default none) Set the path to a logo for the book. If the logo is + # /static/logo.png then the path would be 'logo.png' + BookLogo = 'logo.png' + + # (Optional, default none) Set leaf bundle to render as side menu + # When not specified file structure and weights will be used + # Deprecated, to be removed in June 2022 + BookMenuBundle = '/menu' + + # (Optional, default docs) Specify section of content to render as menu + # You can also set value to "*" to render all sections to menu + BookSection = 'docs' + + # Set source repository location. + # Used for 'Last Modified' and 'Edit this page' links. + BookRepo = 'https://github.com/alex-shpak/hugo-book' + + # Specifies commit portion of the link to the page's last modified commit hash for 'doc' page + # type. + # Required if 'BookRepo' param is set. + # Value used to construct a URL consisting of BookRepo/BookCommitPath/ + # Github uses 'commit', Bitbucket uses 'commits' + BookCommitPath = 'commit' + + # Enable 'Edit this page' links for 'doc' page type. + # Disabled by default. Uncomment to enable. Requires 'BookRepo' param. + # Path must point to the site directory. + BookEditPath = 'edit/master/exampleSite' + + # (Optional, default January 2, 2006) Configure the date format used on the pages + # - In git information + # - In blog posts + BookDateFormat = 'Jan 2, 2006' + + # (Optional, default true) Enables search function with flexsearch, + # Index is built on fly, therefore it might slowdown your website. + # Configuration for indexing can be adjusted in i18n folder per language. + BookSearch = true + + # (Optional, default true) Enables comments template on pages + # By default partials/docs/comments.html includes Disqus template + # See https://gohugo.io/content-management/comments/#configure-disqus + # Can be overwritten by same param in page frontmatter + BookComments = true + + # /!\ This is an experimental feature, might be removed or changed at any time + # (Optional, experimental, default false) Enables portable links and link checks in markdown pages. + # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode + # Theme will print warning if page referenced in markdown does not exists. + BookPortableLinks = true + + # /!\ This is an experimental feature, might be removed or changed at any time + # (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use. + BookServiceWorker = true +``` + +### Multi-Language Support + +Theme supports Hugo's [multilingual mode](https://gohugo.io/content-management/multilingual/), just follow configuration guide there. You can also tweak search indexing configuration per language in `i18n` folder. + +### Page Configuration + +You can specify additional params in the front matter of individual pages: + +```toml +# Set type to 'docs' if you want to render page outside of configured section or if you render section other than 'docs' +type = 'docs' + +# Set page weight to re-arrange items in file-tree menu (if BookMenuBundle not set) +weight = 10 + +# (Optional) Set to 'true' to mark page as flat section in file-tree menu (if BookMenuBundle not set) +bookFlatSection = false + +# (Optional) Set to hide nested sections or pages at that level. Works only with file-tree menu mode +bookCollapseSection = true + +# (Optional) Set true to hide page or section from side menu (if BookMenuBundle not set) +bookHidden = false + +# (Optional) Set 'false' to hide ToC from page +bookToC = true + +# (Optional) If you have enabled BookComments for the site, you can disable it for specific pages. +bookComments = true + +# (Optional) Set to 'false' to exclude page from search index. +bookSearchExclude = true + +# (Optional) Set explicit href attribute for this page in a menu (if BookMenuBundle not set) +bookHref = '' +``` + +### Partials + +There are layout partials available for you to easily override components of the theme in `layouts/partials/`. + +In addition to this, there are several empty partials you can override to easily add/inject code. + +| Empty Partial | Placement | +| -------------------------------------------------- | ------------------------------------------- | +| `layouts/partials/docs/inject/head.html` | Before closing `` tag | +| `layouts/partials/docs/inject/body.html` | Before closing `` tag | +| `layouts/partials/docs/inject/footer.html` | After page footer content | +| `layouts/partials/docs/inject/menu-before.html` | At the beginning of `