From ff112713f932f9c6b79f3c525fdf13bc3993ab56 Mon Sep 17 00:00:00 2001 From: Ben Cuan Date: Sun, 1 Jan 2023 23:41:14 +0000 Subject: [PATCH] initial commit: combine book with quartz --- .gitignore | 5 + .gitmodules | 3 + LICENSE | 20 + Makefile | 24 + README.md | 218 +++ archetypes/docs.md | 10 + archetypes/posts.md | 6 + assets/_amethyst.scss | 80 ++ assets/_custom.scss | 3 + assets/_defaults.scss | 66 + assets/_fonts.scss | 39 + assets/_main.scss | 364 +++++ assets/_markdown.scss | 196 +++ assets/_print.scss | 17 + assets/_shortcodes.scss | 104 ++ assets/_utils.scss | 92 ++ assets/_variables.scss | 3 + assets/book.scss | 16 + assets/clipboard.js | 24 + assets/indices/.gitkeep | 0 assets/indices/contentIndex.json | 266 ++++ assets/indices/linkIndex.json | 744 ++++++++++ assets/manifest.json | 15 + assets/menu-reset.js | 7 + assets/mermaid.json | 6 + assets/normalize.css | 349 +++++ assets/plugins/_numbered.scss | 36 + assets/plugins/_scrollbars.scss | 26 + assets/quartz/js/callouts.js | 6 + assets/quartz/js/clipboard.js | 45 + assets/quartz/js/code-title.js | 17 + assets/quartz/js/darkmode.js | 37 + assets/quartz/js/full-text-search.js | 61 + assets/quartz/js/graph.js | 269 ++++ assets/quartz/js/menu-reset.js | 7 + assets/quartz/js/popover.js | 74 + assets/quartz/js/router.js | 26 + assets/quartz/js/semantic-search.js | 54 + assets/quartz/js/sw-register.js | 7 + assets/quartz/js/sw.js | 55 + assets/quartz/js/util.js | 224 +++ assets/quartz/styles/_callouts.scss | 170 +++ assets/quartz/styles/_dark_syntax.scss | 85 ++ assets/quartz/styles/_light_syntax.scss | 85 ++ assets/quartz/styles/base.scss | 623 ++++++++ assets/quartz/styles/clipboard.scss | 47 + assets/quartz/styles/code-title.scss | 20 + assets/quartz/styles/custom.scss | 31 + assets/quartz/styles/darkmode.scss | 44 + assets/quartz/styles/syntax.scss | 66 + assets/search-data.json | 15 + assets/search.js | 104 ++ assets/sw-register.js | 7 + assets/sw.js | 55 + config.yaml | 143 ++ content/_index.md | 28 + content/docs/example/_index.md | 71 + .../example/collapsed/3rd-level/4th-level.md | 12 + .../example/collapsed/3rd-level/_index.md | 26 + content/docs/example/collapsed/_index.md | 4 + content/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/docs/shortcodes/_index.md | 3 + content/docs/shortcodes/buttons.md | 13 + content/docs/shortcodes/columns.md | 45 + content/docs/shortcodes/details.md | 22 + content/docs/shortcodes/expand.md | 35 + content/docs/shortcodes/hints.md | 32 + content/docs/shortcodes/katex.md | 28 + content/docs/shortcodes/mermaid.md | 41 + content/docs/shortcodes/section/_index.md | 15 + content/docs/shortcodes/section/first-page.md | 6 + .../docs/shortcodes/section/second-page.md | 6 + content/docs/shortcodes/tabs.md | 50 + content/menu/index.md | 22 + content/notes/CJK + Latex Support (测试).md | 40 + content/notes/_index.md | 6 + content/notes/callouts.md | 63 + content/notes/config.md | 228 +++ content/notes/custom Domain.md | 17 + content/notes/docker.md | 56 + content/notes/editing.md | 66 + content/notes/hosting.md | 96 ++ content/notes/ignore notes.md | 31 + content/notes/images/github-actions.png | Bin 0 -> 118756 bytes content/notes/images/github-pages.png | Bin 0 -> 231282 bytes content/notes/images/google-domains.png | Bin 0 -> 73570 bytes content/notes/images/obsidian-settings.png | Bin 0 -> 26089 bytes content/notes/obsidian.md | 32 + content/notes/philosophy.md | 17 + content/notes/preview changes.md | 43 + content/notes/search.md | 37 + content/notes/setup.md | 32 + content/notes/showcase.md | 23 + content/notes/troubleshooting.md | 81 ++ content/notes/updating.md | 34 + content/posts/_index.md | 7 + content/posts/creating-a-new-theme.md | 1150 +++++++++++++++ content/posts/goisforlovers.md | 344 +++++ content/posts/hugoisforlovers.md | 89 ++ content/posts/migrate-from-jekyll.md | 156 ++ data/graphConfig.yaml | 37 + go.mod | 3 + i18n/am.yaml | 14 + i18n/bn.yaml | 14 + i18n/cn.yaml | 21 + i18n/cs.yaml | 14 + i18n/de.yaml | 14 + i18n/en.yaml | 80 ++ i18n/es.yaml | 14 + i18n/fa.yaml | 20 + i18n/fr.yaml | 14 + i18n/it.yaml | 14 + i18n/ja.yaml | 20 + i18n/jp.yaml | 21 + i18n/ko.yaml | 20 + i18n/nb.yaml | 14 + i18n/pt.yaml | 14 + i18n/ru.yaml | 14 + i18n/sv.yaml | 14 + i18n/tr.yaml | 14 + i18n/uk.yaml | 14 + i18n/zh-TW.yaml | 20 + i18n/zh.yaml | 20 + images/screenshot.png | Bin 0 -> 189080 bytes images/tn.png | Bin 0 -> 195683 bytes layouts/404.html | 34 + layouts/_default/_markup/render-heading.html | 4 + layouts/_default/_markup/render-image.html | 10 + layouts/_default/_markup/render-link.html | 14 + layouts/_default/baseof.html | 87 ++ layouts/_default/list.html | 1 + layouts/_default/single.html | 1 + layouts/partials/docs/brand.html | 8 + layouts/partials/docs/comments.html | 2 + layouts/partials/docs/date.html | 6 + layouts/partials/docs/footer.html | 28 + layouts/partials/docs/header.html | 13 + layouts/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 layouts/partials/docs/inject/menu-after.html | 0 layouts/partials/docs/inject/menu-before.html | 0 layouts/partials/docs/inject/toc-after.html | 0 layouts/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 + layouts/partials/docs/menu.html | 39 + 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 + layouts/partials/docs/toc.html | 3 + layouts/partials/quartz/backlinks.html | 30 + layouts/partials/quartz/contact.html | 19 + layouts/partials/quartz/darkmode.html | 15 + layouts/partials/quartz/date-fmt.html | 7 + layouts/partials/quartz/footer.html | 16 + layouts/partials/quartz/footerIndex.html | 24 + layouts/partials/quartz/github.html | 3 + layouts/partials/quartz/graph.html | 18 + layouts/partials/quartz/head.html | 206 +++ layouts/partials/quartz/header.html | 14 + layouts/partials/quartz/katex.html | 14 + layouts/partials/quartz/mermaid.html | 8 + layouts/partials/quartz/page-list.html | 20 + layouts/partials/quartz/recent.html | 12 + layouts/partials/quartz/search.html | 18 + layouts/partials/quartz/textprocessing.html | 139 ++ layouts/partials/quartz/toc.html | 9 + layouts/posts/list.html | 22 + layouts/posts/single.html | 13 + layouts/shortcodes/button.html | 12 + layouts/shortcodes/columns.html | 7 + layouts/shortcodes/details.html | 7 + layouts/shortcodes/expand.html | 13 + layouts/shortcodes/hint.html | 3 + layouts/shortcodes/katex.html | 13 + layouts/shortcodes/mermaid.html | 12 + layouts/shortcodes/section.html | 10 + layouts/shortcodes/tab.html | 12 + layouts/shortcodes/tabs.html | 15 + layouts/taxonomy/list.html | 13 + layouts/taxonomy/taxonomy.html | 22 + ...s_e129fe35b8d0a70789c8a08429469073.content | 1 + ...scss_e129fe35b8d0a70789c8a08429469073.json | 1 + ...s_0ccffbd39a5ea808aa33646cb7c2a662.content | 1 + ...scss_0ccffbd39a5ea808aa33646cb7c2a662.json | 1 + ...s_f89a788ca0c3892c8201766ffc58739a.content | 1 + ...scss_f89a788ca0c3892c8201766ffc58739a.json | 1 + ...s_f89a788ca0c3892c8201766ffc58739a.content | 1 + ...scss_f89a788ca0c3892c8201766ffc58739a.json | 1 + ...s_0ccffbd39a5ea808aa33646cb7c2a662.content | 2 + ...scss_0ccffbd39a5ea808aa33646cb7c2a662.json | 1 + ...s_0ccffbd39a5ea808aa33646cb7c2a662.content | 1 + ...scss_0ccffbd39a5ea808aa33646cb7c2a662.json | 1 + ...s_0ccffbd39a5ea808aa33646cb7c2a662.content | 1 + ...scss_0ccffbd39a5ea808aa33646cb7c2a662.json | 1 + ...s_0ccffbd39a5ea808aa33646cb7c2a662.content | 1 + ...scss_0ccffbd39a5ea808aa33646cb7c2a662.json | 1 + ...s_0ccffbd39a5ea808aa33646cb7c2a662.content | 1 + ...scss_0ccffbd39a5ea808aa33646cb7c2a662.json | 1 + ...s_0ccffbd39a5ea808aa33646cb7c2a662.content | 1 + ...scss_0ccffbd39a5ea808aa33646cb7c2a662.json | 1 + static/favicon.png | Bin 0 -> 324808 bytes 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 static/fonts/roboto-v27-latin-regular.woff | Bin 0 -> 20332 bytes static/fonts/roboto-v27-latin-regular.woff2 | Bin 0 -> 15688 bytes 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 static/katex/fonts/KaTeX_AMS-Regular.woff2 | Bin 0 -> 32944 bytes static/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 static/katex/fonts/KaTeX_Fraktur-Bold.woff | Bin 0 -> 22632 bytes static/katex/fonts/KaTeX_Fraktur-Bold.woff2 | Bin 0 -> 20360 bytes static/katex/fonts/KaTeX_Fraktur-Regular.ttf | Bin 0 -> 34352 bytes static/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 static/katex/fonts/KaTeX_Main-BoldItalic.ttf | Bin 0 -> 44496 bytes static/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 static/katex/fonts/KaTeX_Main-Italic.woff2 | Bin 0 -> 22748 bytes static/katex/fonts/KaTeX_Main-Regular.ttf | Bin 0 -> 69520 bytes static/katex/fonts/KaTeX_Main-Regular.woff | Bin 0 -> 38112 bytes static/katex/fonts/KaTeX_Main-Regular.woff2 | Bin 0 -> 32464 bytes static/katex/fonts/KaTeX_Math-BoldItalic.ttf | Bin 0 -> 39308 bytes static/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 static/katex/fonts/KaTeX_Math-Italic.woff2 | Bin 0 -> 20096 bytes static/katex/fonts/KaTeX_SansSerif-Bold.ttf | Bin 0 -> 33688 bytes static/katex/fonts/KaTeX_SansSerif-Bold.woff | Bin 0 -> 18516 bytes static/katex/fonts/KaTeX_SansSerif-Bold.woff2 | Bin 0 -> 15732 bytes static/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 static/katex/fonts/KaTeX_Script-Regular.ttf | Bin 0 -> 24620 bytes static/katex/fonts/KaTeX_Script-Regular.woff | Bin 0 -> 13428 bytes static/katex/fonts/KaTeX_Script-Regular.woff2 | Bin 0 -> 12064 bytes static/katex/fonts/KaTeX_Size1-Regular.ttf | Bin 0 -> 12916 bytes static/katex/fonts/KaTeX_Size1-Regular.woff | Bin 0 -> 6696 bytes static/katex/fonts/KaTeX_Size1-Regular.woff2 | Bin 0 -> 5592 bytes static/katex/fonts/KaTeX_Size2-Regular.ttf | Bin 0 -> 12172 bytes static/katex/fonts/KaTeX_Size2-Regular.woff | Bin 0 -> 6436 bytes static/katex/fonts/KaTeX_Size2-Regular.woff2 | Bin 0 -> 5392 bytes static/katex/fonts/KaTeX_Size3-Regular.ttf | Bin 0 -> 8120 bytes static/katex/fonts/KaTeX_Size3-Regular.woff | Bin 0 -> 4568 bytes static/katex/fonts/KaTeX_Size3-Regular.woff2 | Bin 0 -> 3728 bytes static/katex/fonts/KaTeX_Size4-Regular.ttf | Bin 0 -> 11016 bytes static/katex/fonts/KaTeX_Size4-Regular.woff | Bin 0 -> 6184 bytes static/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 static/katex/katex.min.css | 1 + static/katex/katex.min.js | 1 + static/linkmap | 44 + static/mermaid.min.js | 1280 +++++++++++++++++ static/svg/calendar.svg | 1 + static/svg/edit.svg | 1 + static/svg/menu.svg | 1 + static/svg/toc.svg | 1 + static/svg/translate.svg | 1 + theme.toml | 16 + 291 files changed, 11571 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README.md create mode 100644 archetypes/docs.md create mode 100644 archetypes/posts.md create mode 100644 assets/_amethyst.scss create mode 100644 assets/_custom.scss create mode 100644 assets/_defaults.scss create mode 100644 assets/_fonts.scss create mode 100644 assets/_main.scss create mode 100644 assets/_markdown.scss create mode 100644 assets/_print.scss create mode 100644 assets/_shortcodes.scss create mode 100644 assets/_utils.scss create mode 100644 assets/_variables.scss create mode 100644 assets/book.scss create mode 100644 assets/clipboard.js create mode 100644 assets/indices/.gitkeep create mode 100644 assets/indices/contentIndex.json create mode 100644 assets/indices/linkIndex.json create mode 100644 assets/manifest.json create mode 100644 assets/menu-reset.js create mode 100644 assets/mermaid.json create mode 100644 assets/normalize.css create mode 100644 assets/plugins/_numbered.scss create mode 100644 assets/plugins/_scrollbars.scss create mode 100644 assets/quartz/js/callouts.js create mode 100644 assets/quartz/js/clipboard.js create mode 100644 assets/quartz/js/code-title.js create mode 100644 assets/quartz/js/darkmode.js create mode 100644 assets/quartz/js/full-text-search.js create mode 100644 assets/quartz/js/graph.js create mode 100644 assets/quartz/js/menu-reset.js create mode 100644 assets/quartz/js/popover.js create mode 100644 assets/quartz/js/router.js create mode 100644 assets/quartz/js/semantic-search.js create mode 100644 assets/quartz/js/sw-register.js create mode 100644 assets/quartz/js/sw.js create mode 100644 assets/quartz/js/util.js create mode 100644 assets/quartz/styles/_callouts.scss create mode 100644 assets/quartz/styles/_dark_syntax.scss create mode 100644 assets/quartz/styles/_light_syntax.scss create mode 100644 assets/quartz/styles/base.scss create mode 100644 assets/quartz/styles/clipboard.scss create mode 100644 assets/quartz/styles/code-title.scss create mode 100644 assets/quartz/styles/custom.scss create mode 100644 assets/quartz/styles/darkmode.scss create mode 100644 assets/quartz/styles/syntax.scss create mode 100644 assets/search-data.json create mode 100644 assets/search.js create mode 100644 assets/sw-register.js create mode 100644 assets/sw.js create mode 100644 config.yaml create mode 100644 content/_index.md create mode 100644 content/docs/example/_index.md create mode 100644 content/docs/example/collapsed/3rd-level/4th-level.md create mode 100644 content/docs/example/collapsed/3rd-level/_index.md create mode 100644 content/docs/example/collapsed/_index.md create mode 100644 content/docs/example/hidden.md create mode 100644 content/docs/example/table-of-contents/_index.md create mode 100644 content/docs/example/table-of-contents/with-toc.md create mode 100644 content/docs/example/table-of-contents/without-toc.md create mode 100644 content/docs/shortcodes/_index.md create mode 100644 content/docs/shortcodes/buttons.md create mode 100644 content/docs/shortcodes/columns.md create mode 100644 content/docs/shortcodes/details.md create mode 100644 content/docs/shortcodes/expand.md create mode 100644 content/docs/shortcodes/hints.md create mode 100644 content/docs/shortcodes/katex.md create mode 100644 content/docs/shortcodes/mermaid.md create mode 100644 content/docs/shortcodes/section/_index.md create mode 100644 content/docs/shortcodes/section/first-page.md create mode 100644 content/docs/shortcodes/section/second-page.md create mode 100644 content/docs/shortcodes/tabs.md create mode 100644 content/menu/index.md create mode 100644 content/notes/CJK + Latex Support (测试).md create mode 100644 content/notes/_index.md create mode 100644 content/notes/callouts.md create mode 100644 content/notes/config.md create mode 100644 content/notes/custom Domain.md create mode 100644 content/notes/docker.md create mode 100644 content/notes/editing.md create mode 100644 content/notes/hosting.md create mode 100644 content/notes/ignore notes.md create mode 100644 content/notes/images/github-actions.png create mode 100644 content/notes/images/github-pages.png create mode 100644 content/notes/images/google-domains.png create mode 100644 content/notes/images/obsidian-settings.png create mode 100644 content/notes/obsidian.md create mode 100644 content/notes/philosophy.md create mode 100644 content/notes/preview changes.md create mode 100644 content/notes/search.md create mode 100644 content/notes/setup.md create mode 100644 content/notes/showcase.md create mode 100644 content/notes/troubleshooting.md create mode 100644 content/notes/updating.md create mode 100644 content/posts/_index.md create mode 100644 content/posts/creating-a-new-theme.md create mode 100644 content/posts/goisforlovers.md create mode 100644 content/posts/hugoisforlovers.md create mode 100644 content/posts/migrate-from-jekyll.md create mode 100644 data/graphConfig.yaml create mode 100644 go.mod create mode 100644 i18n/am.yaml create mode 100644 i18n/bn.yaml create mode 100644 i18n/cn.yaml create mode 100644 i18n/cs.yaml create mode 100644 i18n/de.yaml create mode 100644 i18n/en.yaml create mode 100644 i18n/es.yaml create mode 100644 i18n/fa.yaml create mode 100644 i18n/fr.yaml create mode 100644 i18n/it.yaml create mode 100644 i18n/ja.yaml create mode 100644 i18n/jp.yaml create mode 100644 i18n/ko.yaml create mode 100644 i18n/nb.yaml create mode 100644 i18n/pt.yaml create mode 100644 i18n/ru.yaml create mode 100644 i18n/sv.yaml create mode 100644 i18n/tr.yaml create mode 100644 i18n/uk.yaml create mode 100644 i18n/zh-TW.yaml create mode 100644 i18n/zh.yaml create mode 100644 images/screenshot.png create mode 100644 images/tn.png create mode 100644 layouts/404.html create mode 100644 layouts/_default/_markup/render-heading.html create mode 100644 layouts/_default/_markup/render-image.html create mode 100644 layouts/_default/_markup/render-link.html create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/partials/docs/brand.html create mode 100644 layouts/partials/docs/comments.html create mode 100644 layouts/partials/docs/date.html create mode 100644 layouts/partials/docs/footer.html create mode 100644 layouts/partials/docs/header.html create mode 100644 layouts/partials/docs/html-head-title.html create mode 100644 layouts/partials/docs/html-head.html create mode 100644 layouts/partials/docs/inject/body.html create mode 100644 layouts/partials/docs/inject/content-after.html create mode 100644 layouts/partials/docs/inject/content-before.html create mode 100644 layouts/partials/docs/inject/footer.html create mode 100644 layouts/partials/docs/inject/head.html create mode 100644 layouts/partials/docs/inject/menu-after.html create mode 100644 layouts/partials/docs/inject/menu-before.html create mode 100644 layouts/partials/docs/inject/toc-after.html create mode 100644 layouts/partials/docs/inject/toc-before.html create mode 100644 layouts/partials/docs/languages.html create mode 100644 layouts/partials/docs/menu-bundle.html create mode 100644 layouts/partials/docs/menu-filetree.html create mode 100644 layouts/partials/docs/menu-hugo.html create mode 100644 layouts/partials/docs/menu.html create mode 100644 layouts/partials/docs/post-meta.html create mode 100644 layouts/partials/docs/search.html create mode 100644 layouts/partials/docs/taxonomy.html create mode 100644 layouts/partials/docs/title.html create mode 100644 layouts/partials/docs/toc.html create mode 100644 layouts/partials/quartz/backlinks.html create mode 100644 layouts/partials/quartz/contact.html create mode 100644 layouts/partials/quartz/darkmode.html create mode 100644 layouts/partials/quartz/date-fmt.html create mode 100644 layouts/partials/quartz/footer.html create mode 100644 layouts/partials/quartz/footerIndex.html create mode 100644 layouts/partials/quartz/github.html create mode 100644 layouts/partials/quartz/graph.html create mode 100644 layouts/partials/quartz/head.html create mode 100644 layouts/partials/quartz/header.html create mode 100644 layouts/partials/quartz/katex.html create mode 100644 layouts/partials/quartz/mermaid.html create mode 100644 layouts/partials/quartz/page-list.html create mode 100644 layouts/partials/quartz/recent.html create mode 100644 layouts/partials/quartz/search.html create mode 100644 layouts/partials/quartz/textprocessing.html create mode 100644 layouts/partials/quartz/toc.html create mode 100644 layouts/posts/list.html create mode 100644 layouts/posts/single.html create mode 100644 layouts/shortcodes/button.html create mode 100644 layouts/shortcodes/columns.html create mode 100644 layouts/shortcodes/details.html create mode 100644 layouts/shortcodes/expand.html create mode 100644 layouts/shortcodes/hint.html create mode 100644 layouts/shortcodes/katex.html create mode 100644 layouts/shortcodes/mermaid.html create mode 100644 layouts/shortcodes/section.html create mode 100644 layouts/shortcodes/tab.html create mode 100644 layouts/shortcodes/tabs.html create mode 100644 layouts/taxonomy/list.html create mode 100644 layouts/taxonomy/taxonomy.html create mode 100644 resources/_gen/assets/scss/book.scss_e129fe35b8d0a70789c8a08429469073.content create mode 100644 resources/_gen/assets/scss/book.scss_e129fe35b8d0a70789c8a08429469073.json create mode 100644 resources/_gen/assets/scss/quartz/styles/_callouts.scss_0ccffbd39a5ea808aa33646cb7c2a662.content create mode 100644 resources/_gen/assets/scss/quartz/styles/_callouts.scss_0ccffbd39a5ea808aa33646cb7c2a662.json create mode 100644 resources/_gen/assets/scss/quartz/styles/_dark_syntax.scss_f89a788ca0c3892c8201766ffc58739a.content create mode 100644 resources/_gen/assets/scss/quartz/styles/_dark_syntax.scss_f89a788ca0c3892c8201766ffc58739a.json create mode 100644 resources/_gen/assets/scss/quartz/styles/_light_syntax.scss_f89a788ca0c3892c8201766ffc58739a.content create mode 100644 resources/_gen/assets/scss/quartz/styles/_light_syntax.scss_f89a788ca0c3892c8201766ffc58739a.json create mode 100644 resources/_gen/assets/scss/quartz/styles/base.scss_0ccffbd39a5ea808aa33646cb7c2a662.content create mode 100644 resources/_gen/assets/scss/quartz/styles/base.scss_0ccffbd39a5ea808aa33646cb7c2a662.json create mode 100644 resources/_gen/assets/scss/quartz/styles/clipboard.scss_0ccffbd39a5ea808aa33646cb7c2a662.content create mode 100644 resources/_gen/assets/scss/quartz/styles/clipboard.scss_0ccffbd39a5ea808aa33646cb7c2a662.json create mode 100644 resources/_gen/assets/scss/quartz/styles/code-title.scss_0ccffbd39a5ea808aa33646cb7c2a662.content create mode 100644 resources/_gen/assets/scss/quartz/styles/code-title.scss_0ccffbd39a5ea808aa33646cb7c2a662.json create mode 100644 resources/_gen/assets/scss/quartz/styles/custom.scss_0ccffbd39a5ea808aa33646cb7c2a662.content create mode 100644 resources/_gen/assets/scss/quartz/styles/custom.scss_0ccffbd39a5ea808aa33646cb7c2a662.json create mode 100644 resources/_gen/assets/scss/quartz/styles/darkmode.scss_0ccffbd39a5ea808aa33646cb7c2a662.content create mode 100644 resources/_gen/assets/scss/quartz/styles/darkmode.scss_0ccffbd39a5ea808aa33646cb7c2a662.json create mode 100644 resources/_gen/assets/scss/quartz/styles/syntax.scss_0ccffbd39a5ea808aa33646cb7c2a662.content create mode 100644 resources/_gen/assets/scss/quartz/styles/syntax.scss_0ccffbd39a5ea808aa33646cb7c2a662.json create mode 100644 static/favicon.png create mode 100644 static/flexsearch.min.js create mode 100644 static/fonts/roboto-mono-v13-latin-regular.woff create mode 100644 static/fonts/roboto-mono-v13-latin-regular.woff2 create mode 100644 static/fonts/roboto-v27-latin-700.woff create mode 100644 static/fonts/roboto-v27-latin-700.woff2 create mode 100644 static/fonts/roboto-v27-latin-regular.woff create mode 100644 static/fonts/roboto-v27-latin-regular.woff2 create mode 100644 static/katex/auto-render.min.js create mode 100644 static/katex/fonts/KaTeX_AMS-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_AMS-Regular.woff create mode 100644 static/katex/fonts/KaTeX_AMS-Regular.woff2 create mode 100644 static/katex/fonts/KaTeX_Caligraphic-Bold.ttf create mode 100644 static/katex/fonts/KaTeX_Caligraphic-Bold.woff create mode 100644 static/katex/fonts/KaTeX_Caligraphic-Bold.woff2 create mode 100644 static/katex/fonts/KaTeX_Caligraphic-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_Caligraphic-Regular.woff create mode 100644 static/katex/fonts/KaTeX_Caligraphic-Regular.woff2 create mode 100644 static/katex/fonts/KaTeX_Fraktur-Bold.ttf create mode 100644 static/katex/fonts/KaTeX_Fraktur-Bold.woff create mode 100644 static/katex/fonts/KaTeX_Fraktur-Bold.woff2 create mode 100644 static/katex/fonts/KaTeX_Fraktur-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_Fraktur-Regular.woff create mode 100644 static/katex/fonts/KaTeX_Fraktur-Regular.woff2 create mode 100644 static/katex/fonts/KaTeX_Main-Bold.ttf create mode 100644 static/katex/fonts/KaTeX_Main-Bold.woff create mode 100644 static/katex/fonts/KaTeX_Main-Bold.woff2 create mode 100644 static/katex/fonts/KaTeX_Main-BoldItalic.ttf create mode 100644 static/katex/fonts/KaTeX_Main-BoldItalic.woff create mode 100644 static/katex/fonts/KaTeX_Main-BoldItalic.woff2 create mode 100644 static/katex/fonts/KaTeX_Main-Italic.ttf create mode 100644 static/katex/fonts/KaTeX_Main-Italic.woff create mode 100644 static/katex/fonts/KaTeX_Main-Italic.woff2 create mode 100644 static/katex/fonts/KaTeX_Main-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_Main-Regular.woff create mode 100644 static/katex/fonts/KaTeX_Main-Regular.woff2 create mode 100644 static/katex/fonts/KaTeX_Math-BoldItalic.ttf create mode 100644 static/katex/fonts/KaTeX_Math-BoldItalic.woff create mode 100644 static/katex/fonts/KaTeX_Math-BoldItalic.woff2 create mode 100644 static/katex/fonts/KaTeX_Math-Italic.ttf create mode 100644 static/katex/fonts/KaTeX_Math-Italic.woff create mode 100644 static/katex/fonts/KaTeX_Math-Italic.woff2 create mode 100644 static/katex/fonts/KaTeX_SansSerif-Bold.ttf create mode 100644 static/katex/fonts/KaTeX_SansSerif-Bold.woff create mode 100644 static/katex/fonts/KaTeX_SansSerif-Bold.woff2 create mode 100644 static/katex/fonts/KaTeX_SansSerif-Italic.ttf create mode 100644 static/katex/fonts/KaTeX_SansSerif-Italic.woff create mode 100644 static/katex/fonts/KaTeX_SansSerif-Italic.woff2 create mode 100644 static/katex/fonts/KaTeX_SansSerif-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_SansSerif-Regular.woff create mode 100644 static/katex/fonts/KaTeX_SansSerif-Regular.woff2 create mode 100644 static/katex/fonts/KaTeX_Script-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_Script-Regular.woff create mode 100644 static/katex/fonts/KaTeX_Script-Regular.woff2 create mode 100644 static/katex/fonts/KaTeX_Size1-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_Size1-Regular.woff create mode 100644 static/katex/fonts/KaTeX_Size1-Regular.woff2 create mode 100644 static/katex/fonts/KaTeX_Size2-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_Size2-Regular.woff create mode 100644 static/katex/fonts/KaTeX_Size2-Regular.woff2 create mode 100644 static/katex/fonts/KaTeX_Size3-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_Size3-Regular.woff create mode 100644 static/katex/fonts/KaTeX_Size3-Regular.woff2 create mode 100644 static/katex/fonts/KaTeX_Size4-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_Size4-Regular.woff create mode 100644 static/katex/fonts/KaTeX_Size4-Regular.woff2 create mode 100644 static/katex/fonts/KaTeX_Typewriter-Regular.ttf create mode 100644 static/katex/fonts/KaTeX_Typewriter-Regular.woff create mode 100644 static/katex/fonts/KaTeX_Typewriter-Regular.woff2 create mode 100644 static/katex/katex.min.css create mode 100644 static/katex/katex.min.js create mode 100644 static/linkmap create mode 100644 static/mermaid.min.js create mode 100644 static/svg/calendar.svg create mode 100644 static/svg/edit.svg create mode 100644 static/svg/menu.svg create mode 100644 static/svg/toc.svg create mode 100644 static/svg/translate.svg create mode 100644 theme.toml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ed38cff --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +public/ +exampleSite/public/ +.DS_Store +.hugo_build.lock +themes \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..12744dd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/hugo-book"] + path = themes/hugo-book + url = https://github.com/alex-shpak/hugo-book diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..92452b3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2022 Ben Cuan + +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/Makefile b/Makefile new file mode 100644 index 0000000..50d542a --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +.DEFAULT_GOAL := serve + +help: ## Show all Makefile targets + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +update: ## Update Quartz to the latest version on Github + go install github.com/jackyzha0/hugo-obsidian@latest + @git remote show upstream || (echo "remote 'upstream' not present, setting 'upstream'" && git remote add upstream https://github.com/jackyzha0/quartz.git) + git fetch upstream + git log --oneline --decorate --graph ..upstream/hugo + git checkout -p upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data + +update-force: ## Forcefully pull all changes and don't ask to patch + go install github.com/jackyzha0/hugo-obsidian@latest + @git remote show upstream || (echo "remote 'upstream' not present, setting 'upstream'" && git remote add upstream https://github.com/jackyzha0/quartz.git) + git fetch upstream + git checkout upstream/hugo -- layouts .github Makefile assets/js assets/styles/base.scss assets/styles/darkmode.scss config.toml data + +serve: ## Serve Quartz locally + hugo-obsidian -input=content -output=assets/indices -index -root=. + hugo server --enableGitInfo --minify --bind=$(or $(HUGO_BIND),0.0.0.0) --baseURL=$(or $(HUGO_BASEURL),http://localhost) --port=$(or $(HUGO_PORT),1313) --appendPort=$(or $(HUGO_APPENDPORT),true) + +docker: ## Serve locally using Docker + docker run -it --volume=$(shell pwd):/quartz -p 1313:1313 ghcr.io/jackyzha0/quartz:hugo diff --git a/README.md b/README.md new file mode 100644 index 0000000..02cad52 --- /dev/null +++ b/README.md @@ -0,0 +1,218 @@ +# Amethyst Hugo 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) + +Amethyst combines the navigational features of [hugo-book](https://github.com/alex-shpak/hugo-book) with the Obsidian integrations of [quartz](https://github.com/jackyzha0/quartz) to provide a hassle-free place to store and host personal notes or documentation. + +Insert screenshot here + +## Features +- Most of the features of the original themes (Quartz and Book) +- Mobile-friendly +- Multi-language support +- Customizable +- Dark Mode +- LaTeX support +- Obsidian-style back/forward links and page previews +- Interactive graph view +- Tab cards for practice problems + +## Requirements + +- **Go 1.16 or higher**: [installation instructions](https://golang.org/doc/install) +- **Hugo 0.93 or higher:** [installation instructions](https://gohugo.io/getting-started/installing/) + - If installing on Ubuntu/Debian-based systems, this is a higher version than is available in apt at the time of writing. Install the extended version from the [releases page](https://github.com/gohugoio/hugo/releases) instead. +- **Hugo-obsidian:** Run `go install github.com/jackyzha0/hugo-obsidian@latest`. + - If you're getting a `command not found` error, [ensure that your PATH is configured properly so that binaries in the GOPATH can be executed](https://stackoverflow.com/questions/21001387/how-do-i-set-the-gopath-environment-variable-on-ubuntu-what-file-must-i-edit). + +## Installation + +### Install as git submodule +Navigate to your hugo project root and run: + +``` +git submodule add https://github.com/64bitpandas/amethyst themes/amethyst +``` + +Then run hugo (or set `theme = "amethyst"`/`theme: amethyst` in configuration file) + +``` +hugo server --minify --theme amethyst +``` + +### 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 . +``` + +```sh +hugo server --minify --theme hugo-book +``` + +## Configuration + +### Site Configuration + +Most configuration can be done by creating a `config.yaml` file in the root directory and editing the parameters. You can start by copying the example [here](https://github.com/64bitpandas/amethyst/blob/main/config.yaml). + +Graph-specific configuration can be added to `data/graphConfig.yaml`. (Example [here](https://github.com/64bitpandas/amethyst/blob/main/data/graphConfig.yaml)) + + +### 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 `