From bbf21e920156039b3a36e6687397bf25f51e8a16 Mon Sep 17 00:00:00 2001 From: engboris Date: Thu, 6 Jun 2024 00:37:36 +0200 Subject: [PATCH] Initial guide --- .gitignore | 2 + .hugo_build.lock | 0 Makefile | 6 + archetypes/default.md | 5 + content/_index.md | 23 + content/docs/introduction/_index.md | 5 + content/docs/introduction/install.md | 16 + content/docs/introduction/what.md | 18 + content/docs/playing/_index.md | 5 + content/docs/playing/interaction.md | 127 ++ content/docs/playing/syntax.md | 67 + hugo.toml | 3 + themes/hugo-book/.github/workflows/main.yml | 34 + 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 | 122 ++ themes/hugo-book/exampleSite/config.yaml | 118 ++ .../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 | 35 + .../content.en/docs/shortcodes/mermaid.md | 46 + .../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 + 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 | 57 + .../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 + themes/hugo-book/layouts/shortcodes/html.html | 1 + .../hugo-book/layouts/shortcodes/katex.html | 13 + .../hugo-book/layouts/shortcodes/mermaid.html | 12 + .../hugo-book/layouts/shortcodes/section.html | 12 + 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 | 1759 +++++++++++++++++ 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 + 227 files changed, 8080 insertions(+) create mode 100644 .gitignore create mode 100644 .hugo_build.lock create mode 100644 Makefile create mode 100644 archetypes/default.md create mode 100644 content/_index.md create mode 100644 content/docs/introduction/_index.md create mode 100644 content/docs/introduction/install.md create mode 100644 content/docs/introduction/what.md create mode 100644 content/docs/playing/_index.md create mode 100644 content/docs/playing/interaction.md create mode 100644 content/docs/playing/syntax.md create mode 100644 hugo.toml create mode 100644 themes/hugo-book/.github/workflows/main.yml 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/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/html.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/.gitignore b/.gitignore new file mode 100644 index 0000000..73ab876 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +public/ +resources/ diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6b4181e --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +build: + hugo --minify --theme hugo-book + +watch: + hugo server --minify --theme hugo-book + diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..c6f3fce --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,5 @@ ++++ +title = '{{ replace .File.ContentBaseName "-" " " | title }}' +date = {{ .Date }} +draft = true ++++ diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..bf57927 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,23 @@ +--- +title: TS Guide +type: docs +--- + +# Welcome to TS Guide + +The purpose of this guide is to make you familiar with Girard's recent works +through programming and exercises. + +Note that everything in this guide is my own interpretation and is not +necessarily perfect faithful to Girard's point of view. + +Also keep in mind that the development of transcendental syntax is currently +very unstable. For that reason, this guide is subject to constant changes. +I created this guide because I wanted other people to be part of the process of +understanding Girard's transcendental syntax by playing with it and developing +new ideas. + +Enjoy! + + +Boris Eng. \ No newline at end of file diff --git a/content/docs/introduction/_index.md b/content/docs/introduction/_index.md new file mode 100644 index 0000000..7864f76 --- /dev/null +++ b/content/docs/introduction/_index.md @@ -0,0 +1,5 @@ +--- +title: "Introduction" +bookFlatSection: true +weight: 1 +--- diff --git a/content/docs/introduction/install.md b/content/docs/introduction/install.md new file mode 100644 index 0000000..17f9b4b --- /dev/null +++ b/content/docs/introduction/install.md @@ -0,0 +1,16 @@ +--- +title: Install LSC +weight: 2 +--- + +# Install LSC + +To install the Large Star Collider (LSC), go to this git repository: + +https://github.com/engboris/large-star-collider + +You can either compile the LSC from sources or download a released binary. +- For Linux x86-x64: https://github.com/engboris/large-star-collider/tags + +You can then write your programs on any text file and follow the instructions +in the `README.md` file of the Github repository to execute them! diff --git a/content/docs/introduction/what.md b/content/docs/introduction/what.md new file mode 100644 index 0000000..b0af777 --- /dev/null +++ b/content/docs/introduction/what.md @@ -0,0 +1,18 @@ +--- +title: "What it is about" +weight: 1 +--- + +# What it is about + +## Transcendental syntax + +(soon) + +## Stellar resolution + +(soon) + +## Large star collider + +(soon) \ No newline at end of file diff --git a/content/docs/playing/_index.md b/content/docs/playing/_index.md new file mode 100644 index 0000000..38bfe7f --- /dev/null +++ b/content/docs/playing/_index.md @@ -0,0 +1,5 @@ +--- +title: "Playing with stars" +bookFlatSection: true +weight: 1 +--- diff --git a/content/docs/playing/interaction.md b/content/docs/playing/interaction.md new file mode 100644 index 0000000..f489f1a --- /dev/null +++ b/content/docs/playing/interaction.md @@ -0,0 +1,127 @@ +--- +title: "Interaction" +weight: 2 +--- + +# Matchable rays + +Usually, in the theory of term unification, we say that two terms (which are +basically rays without polarities) are *unifiable* where there a substitution +of variables making them equal. For instance `f(X)` and `f(h(Y))` are unifiable +with the substitution `{X:=h(Y)}` replacing `X` by `h(Y)`. + +We are usually interested in the most general substitution. We could have +`{X:=h(c(a)); Y:={c(a)}` but it would be less general. + +In the same fashion, we say that two rays are *matchable* when their underlying +terms (obtained by dropping polarities) are unifiable but we also want opposite +polarities to face each other instead of looking for equal symbols: we want +symbols prefixed with `+` to match same symbols but prefixed with `-`: + +- `+f(X)` and `-f(h(a))` are matchable with `{X:=h(a)}`; +- `f(X)` and `f(h(a))` are not matchable; +- `+f(X)` and `+f(h(a))` are not matchable; +- `+f(+h(X))` and `-f(-h(a))` are matchable with `{X:=a}`; +- `+f(+h(X))` and `-f(-h(+a))` are matchable with `{X:=+a}`; + +# Fusion + +Stars are able to interact, through an operation called *fusion*, by using the +principle of Robinson's resolution rule. We define an operator `` with +connects the `i`th ray of a star to the `j`th ray of another star. + +Fusion is defined as follows for matchable rays `r` and `r'`: +``` +r r1 ... rk <0,0> r' r1' ... rk' == theta(r1) ... theta(rk) theta(r1') ... theta(rk') +``` + +where `theta` is the most general substitution induced by `r` and `r'`. + +Notice that: +- `r` and `r'` interact and are annihilated; +- the two stars are merged; +- the substitution resolving the conflict between `r` and `r'` is propagated to +adjacent rays. + +For example: +``` +X +f(X) <1,0> -f(a) == a +``` + +{{< hint info >}} +This corresponds to the cut rule for first-order logic except that we are +in a logic-agnostic setting (our symbols do not hold any meaning). +{{< /hint >}} + +# Execution + +You have to put a focus on some stars to start a computation as in: +``` +X1, f(X1); ++a(X2 Y2); +@-h(f(X3 Y3)) +a(+f(X4) h(-f(X4))); +``` + +An *interaction configuration* is an expression `R |- I'` where: +- `R` is a static constellation called *reference constellation*. It corresponds +to unmarked stars; +- `I` is a dynamic constellation called *interaction space*. It corresponds to +all stars marked by a focus symbol `@`. It can be seen as a "working space". + +The LSC execute constellations by looking for copies of partners in `R` for +each rays of `I`, as follows: +1. select a ray `ri` in a star `s` of `I`; +2. look for possible connections with rays `rj` belonging to stars in `R`; +3. duplicate `s` so that there is exactly one copy of `s` in `I` for every `rj`; +4. replace every copy by its fusion `s s'`, where `s'` is the star to + which `rj` belongs; +5. repeat until there is no possible interaction in `I`. + +The result of execution consists of all *neutral* stars that remain in `I`, i.e. +those without any polarized rays. Indeed, polarized stars are ignored/removed +because they correspond to *unfinished* (or stuck) computations. + +# Example + +We want to execute the following constellation: +``` ++7(l:X) +7(r:X); 3(X) +8(l:X); @+8(r:X) 6(X); +-7(X) -8(X); +``` + +We distinguish an interaction space on which we focus interaction and a +reference constellation where we copy possible partners. We prefix `>>` for +selected rays. We have: +``` ++7(l:X) +7(r:X); 3(X) +8(l:X); -7(X) >>-8(X) |- >>+8(r:X) 6(X); +``` + +``` ++7(l:X) +7(r:X); 3(X) +8(l:X); -7(X) -8(X) |- -7(r:X) 6(X); +``` + +``` ++7(l:X) >>+7(r:X); 3(X) +8(l:X); -7(X) -8(X) |- >>-7(r:X) 6(X); +``` + +``` ++7(l:X) +7(r:X); 3(X) +8(l:X); -7(X) -8(X) |- +7(l:X) 6(X); +``` + +``` ++7(l:X) +7(r:X); 3(X) +8(l:X); >>-7(X) -8(X) |- >>+7(l:X) 6(X); +``` + +``` ++7(l:X) +7(r:X); 3(X) +8(l:X); -7(X) -8(X) |- -8(l:X) 6(X); +``` + +``` ++7(l:X) +7(r:X); 3(X) >>+8(l:X); -7(X) -8(X) |- >>-8(l:X) 6(X); +``` + +``` ++7(l:X) +7(r:X); 3(X) +8(l:X); -7(X) -8(X) |- 3(X) 6(X); +``` + +The result of the computation is `3(X) 6(X);`. \ No newline at end of file diff --git a/content/docs/playing/syntax.md b/content/docs/playing/syntax.md new file mode 100644 index 0000000..07610e4 --- /dev/null +++ b/content/docs/playing/syntax.md @@ -0,0 +1,67 @@ +--- +title: "Syntax" +weight: 1 +--- + +# Rays + +Either a variable (uppercase, possibly followed by digits) or a polarised (+/-) +or unpolarised (lowercase, possibly containing `_` and digits) +function symbol applied to other rays (or nothing in case of constants): + +`X`, `a`, `f(X)`, `+f(X)`, `-f(-h(a, Y1), X2)`, `+add_dec(0, 2, 2)`. + +Commas can be omitted: + +`-f(-h(a Y1) X2)`, `+add_dec(0 2 2)`, `string(hello i am X)`. + +# Cons + +There is a special binary infix function symbol `:` which can be used to +concatenate rays: + +`a:X`, `a:b:b:X`, `f(a:X):+f(0:1:X):-f(Y)`. + +# Stars + +An unordered sequence of rays ending with a semicolon `;`: + +``` +X a +f(X); +``` + +# Constellations + +An unordered sequence of stars: + +``` +X a +f(X); -f(-h(a Y1) X2); ++add_dec(0 2 2); +``` + +All variables are local to their stars, hence the occurrences of `X` in the +first line are distinct from the one in the second line. + +# Focus + +You can prefix stars with a `@` symbol to put a *focus* over them. This will +affect the behaviour of computation: + +``` +@X a +f(X); +@-f(-h(a Y1) X2); ++add_dec(0 2 2); +``` + +# Comments + +``` +'this is a comment on a single line +'this is another comment + +''' +this is a +comment on +several lines +''' +``` \ No newline at end of file diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..f01db71 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,3 @@ +baseURL = 'https://tsguide.refl.fr/' +languageCode = 'fr-FR' +title = 'TS Guide' diff --git a/themes/hugo-book/.github/workflows/main.yml b/themes/hugo-book/.github/workflows/main.yml new file mode 100644 index 0000000..86ffb38 --- /dev/null +++ b/themes/hugo-book/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: Build with Hugo + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + hugo-version: + - 'latest' + - '0.79.0' + steps: + - uses: actions/checkout@v4 + with: + submodules: true # Fetch Hugo themes (true OR recursive) + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: ${{ matrix.hugo-version }} + extended: true + + - name: Run Hugo + working-directory: exampleSite + run: hugo --themesDir ../.. + + # - name: Deploy + # uses: peaceiris/actions-gh-pages@v3 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./public + 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..7e159a4 --- /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 `