├── .nvmrc ├── layouts ├── partials │ ├── foot.html │ ├── head │ │ ├── rel-me.html │ │ ├── microformats.html │ │ ├── custom.html │ │ ├── favicons.html │ │ ├── meta.html │ │ └── others.html │ ├── svg-icon-symbols.html │ ├── utils │ │ ├── title.html │ │ ├── content.html │ │ ├── featured.html │ │ └── description.html │ ├── page-metadata.html │ ├── microformats │ │ ├── twitter_cards.html │ │ ├── opengraph.html │ │ └── schema.html │ ├── pagination.html │ ├── search.html │ ├── menu.html │ ├── menu-extra.html │ ├── posts │ │ └── metadata.html │ ├── language.html │ ├── site-footer.html │ └── menu-bundle-np.html ├── robots.txt ├── shortcodes │ ├── icon.html │ ├── gist.html │ ├── tab.html │ ├── mermaid.html │ ├── columns.html │ ├── toc.html │ ├── expand.html │ ├── include.html │ ├── hint.html │ ├── tabs.html │ ├── katex.html │ ├── button.html │ ├── audio.html │ ├── progress.html │ ├── avatar.html │ ├── img.html │ └── propertylist.html ├── _default │ ├── _markup │ │ ├── render-image.html │ │ ├── render-codeblock-mermaid.html │ │ ├── render-link.html │ │ └── render-heading.html │ ├── list.html │ ├── single.html │ ├── terms.html │ ├── taxonomy.html │ └── baseof.html ├── posts │ ├── single.html │ └── list.html └── 404.html ├── .npmrc ├── exampleSite ├── content │ └── en │ │ ├── toc-tree │ │ ├── level-2 │ │ │ ├── _index.md │ │ │ ├── level-2-1.md │ │ │ └── level-2-2.md │ │ ├── level-1 │ │ │ ├── level-1-1.md │ │ │ ├── level-1-2.md │ │ │ ├── level-1-3 │ │ │ │ ├── level-1-3-1.md │ │ │ │ └── _index.md │ │ │ └── _index.md │ │ └── _index.md │ │ ├── _includes │ │ ├── _index.md │ │ └── include-page.md │ │ ├── usage │ │ ├── _index.md │ │ └── customization.md │ │ ├── features │ │ ├── _index.md │ │ ├── theming │ │ │ └── images │ │ │ │ └── theme-example.png │ │ ├── dark-mode │ │ │ ├── images │ │ │ │ └── geekdoc-dark.png │ │ │ └── _index.md │ │ ├── multilingual │ │ │ └── images │ │ │ │ ├── translation-available.png │ │ │ │ └── translation-not-available.png │ │ ├── icon-sets.md │ │ └── code-blocks.md │ │ ├── shortcodes │ │ ├── _index.md │ │ ├── avatar │ │ │ ├── avatar.jpg │ │ │ └── _index.md │ │ ├── images │ │ │ ├── forest-1.jpg │ │ │ ├── forest-2.jpg │ │ │ ├── forest-3.jpg │ │ │ ├── forest-4.jpg │ │ │ ├── forest-5.jpg │ │ │ ├── forest-6.jpg │ │ │ └── forest-7.jpg │ │ ├── audio │ │ │ ├── diamonds-trap.mp3 │ │ │ └── _index.md │ │ ├── icons.md │ │ ├── toc-tree.md │ │ ├── katex.md │ │ ├── buttons.md │ │ ├── progress.md │ │ ├── propertylist.md │ │ ├── expand.md │ │ ├── tabs.md │ │ ├── columns.md │ │ ├── mermaid.md │ │ ├── toc.md │ │ └── hints.md │ │ ├── collapse │ │ ├── level-1 │ │ │ ├── level-1-1.md │ │ │ ├── level-1-2.md │ │ │ └── _index.md │ │ ├── level-2 │ │ │ ├── level-2-1.md │ │ │ ├── level-2-2.md │ │ │ └── _index.md │ │ └── _index.md │ │ ├── posts │ │ ├── _index.md │ │ ├── initial-release.md │ │ └── hello_geekdoc.md │ │ ├── asciidoc │ │ ├── admonition-icons.adoc │ │ └── admonitions.adoc │ │ └── _index.md ├── static │ ├── socialmedia2.png │ ├── _includes │ │ ├── example.html.part │ │ └── example.md.part │ ├── custom.css │ └── .htaccess ├── config │ └── _default │ │ ├── languages.yaml │ │ ├── config.yaml │ │ └── params.yaml ├── data │ ├── menu │ │ ├── extra.yaml │ │ ├── more.yaml │ │ └── main.yaml │ └── properties │ │ ├── shortcode-katex.yaml │ │ ├── shortcode-mermaid.yaml │ │ ├── shortcode-audio.yaml │ │ ├── shortcode-columns.yaml │ │ ├── shortcode-toc-tree.yaml │ │ ├── shortcode-propertylist.yaml │ │ ├── shortcode-hints.yaml │ │ ├── shortcode-toc.yaml │ │ ├── shortcode-images.yaml │ │ ├── shortcode-avatar.yaml │ │ ├── shortcode-progress.yaml │ │ ├── shortcode-buttons.yaml │ │ ├── shortcode-includes.yaml │ │ └── demo.yaml └── layouts │ └── shortcodes │ └── sprites.html ├── src ├── static │ ├── custom.css │ └── fonts │ │ ├── Metropolis.woff │ │ ├── Metropolis.woff2 │ │ ├── LiberationMono.woff │ │ ├── LiberationMono.woff2 │ │ ├── LiberationSans.woff │ │ ├── LiberationSans.woff2 │ │ ├── LiberationSans-Bold.woff │ │ ├── LiberationSans-Bold.woff2 │ │ ├── LiberationSans-Italic.woff │ │ ├── LiberationSans-Italic.woff2 │ │ ├── LiberationSans-BoldItalic.woff │ │ └── LiberationSans-BoldItalic.woff2 ├── sass │ ├── print.scss │ ├── mobile.scss │ ├── main.scss │ ├── _print.scss │ ├── _chroma_base.scss │ ├── _utils.scss │ ├── _fonts.scss │ ├── _asciidoc.scss │ └── _mobile.scss ├── js │ ├── katex.js │ ├── config.js │ ├── mermaid.js │ ├── colorTheme.js │ ├── accessibility.js │ └── index.js └── icons │ ├── check.svg │ ├── keyboard_arrow_down.svg │ ├── keyboard_arrow_up.svg │ ├── arrow_left_alt.svg │ ├── arrow_right_alt.svg │ ├── arrow_back.svg │ ├── keyboard_arrow_left.svg │ ├── keyboard_arrow_right.svg │ ├── star.svg │ ├── menu.svg │ ├── download.svg │ ├── path.svg │ ├── person.svg │ ├── tag.svg │ ├── email.svg │ ├── dangerous.svg │ ├── bookmark.svg │ ├── brightness_light.svg │ ├── copy.svg │ ├── heart.svg │ ├── brightness_auto.svg │ ├── info_outline.svg │ ├── notification.svg │ ├── error_outline.svg │ ├── check_circle_outline.svg │ ├── shield.svg │ ├── search.svg │ ├── brightness_dark.svg │ ├── gitlab.svg │ ├── link.svg │ ├── timer.svg │ ├── date.svg │ ├── cloud_off.svg │ ├── home.svg │ ├── git.svg │ ├── code.svg │ ├── language.svg │ ├── mastodon.svg │ ├── fire.svg │ ├── bitbucket.svg │ ├── matrix.svg │ ├── xmpp.svg │ ├── github.svg │ └── gitea.svg ├── images ├── tn.png ├── readme.png └── screenshot.png ├── archetypes ├── posts.md └── docs.md ├── .prettierrc ├── .lycheeignore ├── .prettierignore ├── renovate.json ├── .markdownlint.yaml ├── .htmlvalidate.json ├── .jsbeautifyrc ├── .tarignore ├── theme.toml ├── .gitignore ├── assets └── search │ ├── config.json │ └── data.json ├── eslint.config.js ├── svgsprite.config.json ├── .cspell.json ├── LICENSE ├── .gitsv └── config.yaml ├── .woodpecker ├── build-package.yaml ├── docs.yaml └── static.yaml ├── i18n ├── zh-cn.yaml ├── ja.yaml ├── am.yaml ├── en.yaml ├── da.yaml ├── nl.yaml ├── de.yaml ├── cs.yaml ├── es.yaml ├── fr.yaml ├── oc.yaml └── it.yaml ├── .github └── settings.yaml ├── CONTRIBUTING.md └── .lighthouserc.yaml /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/* 2 | -------------------------------------------------------------------------------- /layouts/partials/foot.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | loglevel=error 2 | fund=false 3 | engine-strict=true 4 | -------------------------------------------------------------------------------- /exampleSite/content/en/toc-tree/level-2/_index.md: -------------------------------------------------------------------------------- 1 | Level-2 2 | -------------------------------------------------------------------------------- /src/static/custom.css: -------------------------------------------------------------------------------- 1 | /* You can add custom styles here. */ 2 | -------------------------------------------------------------------------------- /exampleSite/content/en/_includes/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | geekdocHidden: true 3 | --- 4 | -------------------------------------------------------------------------------- /exampleSite/content/en/usage/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Usage 3 | weight: -20 4 | --- 5 | -------------------------------------------------------------------------------- /images/tn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/images/tn.png -------------------------------------------------------------------------------- /src/sass/print.scss: -------------------------------------------------------------------------------- 1 | @use "sass:color"; 2 | 3 | @use "_defaults"; 4 | @use "_print"; 5 | -------------------------------------------------------------------------------- /exampleSite/content/en/features/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Features 3 | weight: -15 4 | --- 5 | -------------------------------------------------------------------------------- /images/readme.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/images/readme.png -------------------------------------------------------------------------------- /src/sass/mobile.scss: -------------------------------------------------------------------------------- 1 | @use "sass:color"; 2 | 3 | @use "_defaults"; 4 | @use "_mobile"; 5 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Shortcodes 3 | weight: -10 4 | --- 5 | -------------------------------------------------------------------------------- /images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/images/screenshot.png -------------------------------------------------------------------------------- /archetypes/posts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ replace .Name "-" " " | title }}" 3 | date: {{ .Date }} 4 | --- 5 | -------------------------------------------------------------------------------- /exampleSite/content/en/collapse/level-1/level-1-1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Level 1.1 3 | --- 4 | 5 | Level 1.1 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/collapse/level-1/level-1-2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Level 1.2 3 | --- 4 | 5 | Level 1.2 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/collapse/level-2/level-2-1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Level 2.1 3 | --- 4 | 5 | Level 2.1 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/collapse/level-2/level-2-2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Level 2.2 3 | --- 4 | 5 | Level 2.2 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/toc-tree/level-1/level-1-1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Level 1.1 3 | --- 4 | 5 | Level 1.1 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/toc-tree/level-1/level-1-2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Level 1.2 3 | --- 4 | 5 | Level 1.2 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/toc-tree/level-2/level-2-1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Level 2.1 3 | --- 4 | 5 | Level 2.1 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/toc-tree/level-2/level-2-2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Level 2.2 3 | --- 4 | 5 | Level 2.2 6 | -------------------------------------------------------------------------------- /layouts/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /tags/* 3 | 4 | Sitemap: {{ "sitemap.xml" | absURL }} 5 | -------------------------------------------------------------------------------- /exampleSite/content/en/collapse/level-2/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | geekdocCollapseSection: true 3 | --- 4 | 5 | Level-2 6 | -------------------------------------------------------------------------------- /layouts/partials/head/rel-me.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/static/fonts/Metropolis.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/Metropolis.woff -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 99, 3 | "singleQuote": false, 4 | "semi": false, 5 | "trailingComma": "none" 6 | } 7 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: News 3 | type: posts 4 | weight: 10 5 | geekdocHidden: true 6 | --- 7 | -------------------------------------------------------------------------------- /exampleSite/content/en/toc-tree/level-1/level-1-3/level-1-3-1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Level 1.3.1 3 | --- 4 | 5 | Level 1.3.1 6 | -------------------------------------------------------------------------------- /src/static/fonts/Metropolis.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/Metropolis.woff2 -------------------------------------------------------------------------------- /exampleSite/static/socialmedia2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/static/socialmedia2.png -------------------------------------------------------------------------------- /src/static/fonts/LiberationMono.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/LiberationMono.woff -------------------------------------------------------------------------------- /src/static/fonts/LiberationMono.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/LiberationMono.woff2 -------------------------------------------------------------------------------- /src/static/fonts/LiberationSans.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/LiberationSans.woff -------------------------------------------------------------------------------- /src/static/fonts/LiberationSans.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/LiberationSans.woff2 -------------------------------------------------------------------------------- /exampleSite/config/_default/languages.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | en: 3 | languageName: "English" 4 | contentDir: "content/en" 5 | weight: 10 6 | -------------------------------------------------------------------------------- /src/static/fonts/LiberationSans-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/LiberationSans-Bold.woff -------------------------------------------------------------------------------- /src/static/fonts/LiberationSans-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/LiberationSans-Bold.woff2 -------------------------------------------------------------------------------- /.lycheeignore: -------------------------------------------------------------------------------- 1 | https://github.com/thegeeklab/.+/edit/main/.* 2 | https://unsplash.com.* 3 | https://www.color-hex.com.* 4 | https://geekdocs.de/ 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | _normalize.css 2 | list.json.json 3 | /.lighthouseci/ 4 | /themes/ 5 | /static/js/ 6 | /src/favicon/ 7 | LICENSE 8 | **/*.html 9 | -------------------------------------------------------------------------------- /src/static/fonts/LiberationSans-Italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/LiberationSans-Italic.woff -------------------------------------------------------------------------------- /src/static/fonts/LiberationSans-Italic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/LiberationSans-Italic.woff2 -------------------------------------------------------------------------------- /exampleSite/content/en/collapse/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Collapse 3 | geekdocCollapseSection: true 4 | --- 5 | 6 | Demo collapsible menu entries. 7 | -------------------------------------------------------------------------------- /exampleSite/content/en/collapse/level-1/_index.md: -------------------------------------------------------------------------------- 1 | Level 1 2 | 3 | 4 | 5 | {{< toc-tree >}} 6 | 7 | 8 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": ["github>thegeeklab/renovate-presets"] 4 | } 5 | -------------------------------------------------------------------------------- /src/static/fonts/LiberationSans-BoldItalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/LiberationSans-BoldItalic.woff -------------------------------------------------------------------------------- /src/static/fonts/LiberationSans-BoldItalic.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/src/static/fonts/LiberationSans-BoldItalic.woff2 -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/avatar/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/shortcodes/avatar/avatar.jpg -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/images/forest-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/shortcodes/images/forest-1.jpg -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/images/forest-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/shortcodes/images/forest-2.jpg -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/images/forest-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/shortcodes/images/forest-3.jpg -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/images/forest-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/shortcodes/images/forest-4.jpg -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/images/forest-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/shortcodes/images/forest-5.jpg -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/images/forest-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/shortcodes/images/forest-6.jpg -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/images/forest-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/shortcodes/images/forest-7.jpg -------------------------------------------------------------------------------- /src/js/katex.js: -------------------------------------------------------------------------------- 1 | import "katex/dist/katex.css" 2 | import renderMathInElement from "katex/dist/contrib/auto-render.mjs" 3 | 4 | renderMathInElement(document.body) 5 | -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default: True 3 | MD013: False 4 | MD041: False 5 | MD042: False 6 | MD004: 7 | style: dash 8 | MD010: 9 | code_blocks: False 10 | -------------------------------------------------------------------------------- /archetypes/docs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "{{ .Name | humanize | title }}" 3 | weight: 1 4 | # geekdocFlatSection: false 5 | # geekdocToc: 6 6 | # geekdocHidden: false 7 | --- 8 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/audio/diamonds-trap.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/shortcodes/audio/diamonds-trap.mp3 -------------------------------------------------------------------------------- /layouts/shortcodes/icon.html: -------------------------------------------------------------------------------- 1 | {{ $id := .Get 0 }} 2 | 3 | {{- with $id -}} 4 | 5 | {{- end -}} 6 | -------------------------------------------------------------------------------- /src/sass/main.scss: -------------------------------------------------------------------------------- 1 | @use "_normalize"; 2 | @use "_utils"; 3 | @use "_fonts"; 4 | @use "_base"; 5 | 6 | @use "_markdown"; 7 | @use "_asciidoc"; 8 | @use "_shortcodes"; 9 | -------------------------------------------------------------------------------- /exampleSite/data/menu/extra.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | header: 3 | - name: GitHub 4 | ref: https://github.com/thegeeklab/hugo-geekdoc 5 | icon: gdoc_github 6 | external: true 7 | -------------------------------------------------------------------------------- /exampleSite/content/en/features/theming/images/theme-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/features/theming/images/theme-example.png -------------------------------------------------------------------------------- /layouts/partials/head/microformats.html: -------------------------------------------------------------------------------- 1 | {{ partial "microformats/opengraph.html" . }} 2 | {{ partial "microformats/twitter_cards.html" . }} 3 | {{ partial "microformats/schema" . }} 4 | -------------------------------------------------------------------------------- /layouts/shortcodes/gist.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /exampleSite/content/en/features/dark-mode/images/geekdoc-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/features/dark-mode/images/geekdoc-dark.png -------------------------------------------------------------------------------- /layouts/partials/svg-icon-symbols.html: -------------------------------------------------------------------------------- 1 | {{ range resources.Match "sprites/*.svg" }} 2 | {{ printf "" . | safeHTML }} 3 | {{ .Content | safeHTML }} 4 | {{ end }} 5 | -------------------------------------------------------------------------------- /exampleSite/static/_includes/example.html.part: -------------------------------------------------------------------------------- 1 |

2 | Example HTML include 3 |

4 | 5 |

This is heading 4

6 |
This is heading 5
7 |
This is heading 6
8 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-katex.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: class 4 | type: list 5 | description: List of space-separated CSS class names to apply. 6 | required: false 7 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-mermaid.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: class 4 | type: list 5 | description: List of space-separated CSS class names to apply. 6 | required: false 7 | -------------------------------------------------------------------------------- /exampleSite/content/en/features/multilingual/images/translation-available.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/features/multilingual/images/translation-available.png -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-audio.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: name 4 | type: string 5 | description: Name of the audio resource defined in page front matter. 6 | required: true 7 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-image.html: -------------------------------------------------------------------------------- 1 | {{ .Text }} 6 | {{- /* Drop trailing newlines */ -}} 7 | -------------------------------------------------------------------------------- /exampleSite/content/en/toc-tree/level-1/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | geekdocCollapseSection: true 3 | --- 4 | 5 | Level 1 6 | 7 | 8 | 9 | {{< toc-tree >}} 10 | 11 | 12 | -------------------------------------------------------------------------------- /exampleSite/content/en/toc-tree/level-1/level-1-3/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Level 1.3 3 | --- 4 | 5 | Level 1.3 6 | 7 | 8 | 9 | {{< toc-tree >}} 10 | 11 | 12 | -------------------------------------------------------------------------------- /exampleSite/content/en/features/multilingual/images/translation-not-available.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/thegeeklab/hugo-geekdoc/HEAD/exampleSite/content/en/features/multilingual/images/translation-not-available.png -------------------------------------------------------------------------------- /exampleSite/static/_includes/example.md.part: -------------------------------------------------------------------------------- 1 | _**Example Markdown include**_ 2 | 3 | File including a simple Markdown table. 4 | 5 | | Head 1 | Head 2 | Head 3 | 6 | | ------ | ------ | ------ | 7 | | 1 | 2 | 3 | 8 | -------------------------------------------------------------------------------- /.htmlvalidate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["html-validate:standard"], 3 | "rules": { 4 | "element-required-content": "off", 5 | "element-permitted-content": "off", 6 | "no-raw-characters": "off", 7 | "attribute-misuse": "warn" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.jsbeautifyrc: -------------------------------------------------------------------------------- 1 | { 2 | "indent_size": 4, 3 | "indent_char": " ", 4 | "preserve_newlines": false, 5 | "unformatted" : ["svg"], 6 | "content_unformatted": ["pre"], 7 | "extra_liners": ["head", "body", "html", "main", "header", "footer", "section"] 8 | } 9 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-columns.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: size 4 | type: string 5 | description: Preset of different sizes for the _first_ column. Supported values are `small|regular|large`. 6 | required: false 7 | defaultValue: regular 8 | -------------------------------------------------------------------------------- /src/js/config.js: -------------------------------------------------------------------------------- 1 | export const COLOR_THEME_DARK = "dark" 2 | export const COLOR_THEME_LIGHT = "light" 3 | export const COLOR_THEME_AUTO = "auto" 4 | export const THEME = "hugo-geekdoc" 5 | export const TOGGLE_COLOR_THEMES = [COLOR_THEME_AUTO, COLOR_THEME_DARK, COLOR_THEME_LIGHT] 6 | -------------------------------------------------------------------------------- /src/icons/check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | check 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/keyboard_arrow_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | keyboard_arrow_down 4 | 5 | -------------------------------------------------------------------------------- /src/icons/keyboard_arrow_up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | keyboard_arrow_up 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/_includes/include-page.md: -------------------------------------------------------------------------------- 1 | _**Example page include**_ 2 | 3 | {{< hint type=note >}} 4 | **Example Shortcode**\ 5 | Shortcode used in an include page. 6 | {{< /hint >}} 7 | 8 | | Head 1 | Head 2 | Head 3 | 9 | | ------ | ------ | ------ | 10 | | 1 | 2 | 3 | 11 | -------------------------------------------------------------------------------- /src/icons/arrow_left_alt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | arrow_right_alt 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/arrow_right_alt.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | arrow_right_alt 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/arrow_back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | arrow_back 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/keyboard_arrow_left.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | keyboard_arrow_left 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/keyboard_arrow_right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | keyboard_arrow_right 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/star.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | star 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | menu 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-toc-tree.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: sortBy 4 | type: string 5 | description: | 6 | Override the default sort parameter set by [`geekdocFileTreeSortBy`](/usage/configuration/#site-configuration). 7 | required: false 8 | defaultValue: .Site.Params.geekdocFileTreeSortBy 9 | -------------------------------------------------------------------------------- /src/icons/download.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | download 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/toc-tree/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ToC-Tree 3 | geekdocFlatSection: true 4 | --- 5 | 6 | This is just a demo section for the [toc-tree](/shortcodes/toc-tree/) shortcode. 7 | 8 | 9 | 10 | {{< toc-tree >}} 11 | 12 | 13 | -------------------------------------------------------------------------------- /layouts/partials/utils/title.html: -------------------------------------------------------------------------------- 1 | {{ $title := "" }} 2 | 3 | {{ if .Title }} 4 | {{ $title = .Title }} 5 | {{ else if and .IsSection .File }} 6 | {{ $title = path.Base .File.Dir | humanize | title }} 7 | {{ else if and .IsPage .File }} 8 | {{ $title = .File.BaseFileName | humanize | title }} 9 | {{ end }} 10 | 11 | {{ return $title }} 12 | -------------------------------------------------------------------------------- /layouts/partials/head/custom.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /src/icons/path.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | path 4 | 5 | 6 | -------------------------------------------------------------------------------- /.tarignore: -------------------------------------------------------------------------------- 1 | .envrc 2 | .nvmrc 3 | .npmrc 4 | .tarignore 5 | .git* 6 | .woodpecker* 7 | .lighthouse* 8 | .markdownlint* 9 | .jsbeautify* 10 | .prettier* 11 | .htmlvalidate* 12 | .lycheeignore* 13 | .cspell* 14 | eslint* 15 | example* 16 | webpack* 17 | svgsprite* 18 | package* 19 | node* 20 | local* 21 | dist 22 | src 23 | build 24 | renovate* 25 | resources 26 | CONTRIBUTING.md 27 | -------------------------------------------------------------------------------- /layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ partial "page-header" . }} 3 | 4 | 5 |
9 |

{{ partial "utils/title" . }}

10 | {{ partial "utils/content" . }} 11 |
12 | {{ end }} 13 | -------------------------------------------------------------------------------- /layouts/partials/head/favicons.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 14 | -------------------------------------------------------------------------------- /exampleSite/data/menu/more.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | more: 3 | - name: News 4 | ref: "/posts" 5 | icon: "gdoc_notification" 6 | - name: Releases 7 | ref: "https://github.com/thegeeklab/hugo-geekdoc/releases" 8 | external: true 9 | icon: "gdoc_download" 10 | - name: View Source 11 | ref: "https://github.com/thegeeklab/hugo-geekdoc" 12 | external: true 13 | icon: "gdoc_github" 14 | -------------------------------------------------------------------------------- /layouts/partials/utils/content.html: -------------------------------------------------------------------------------- 1 | {{ $content := .Content }} 2 | 3 | {{ $content = $content | replaceRE `` `` | safeHTML }} 4 | {{ $content = $content | replaceRE `((?:.|\n)+?
)` `
${1}
` | safeHTML }} 5 | 6 | {{ return $content }} 7 | -------------------------------------------------------------------------------- /src/icons/person.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | person 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/static/custom.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --code-max-height: 60rem; 3 | } 4 | 5 | .icon-grid { 6 | width: 8rem; 7 | height: 8rem; 8 | margin: 0.2em; 9 | text-align: center; 10 | padding: 0.3em; 11 | } 12 | 13 | .icon-grid__line { 14 | height: 4rem; 15 | } 16 | 17 | .icon-grid__line .gdoc-icon { 18 | width: 3em; 19 | height: 3em; 20 | } 21 | 22 | .icon-grid__line--text { 23 | font-size: 0.8em; 24 | } 25 | -------------------------------------------------------------------------------- /layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ partial "page-header" . }} 3 | 4 | 5 |
9 |

{{ partial "utils/title" . }}

10 | {{ partial "page-metadata" . }} 11 | {{ partial "utils/content" . }} 12 |
13 | {{ end }} 14 | -------------------------------------------------------------------------------- /src/icons/tag.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | tag 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/email.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | email 4 | 5 | 6 | -------------------------------------------------------------------------------- /theme.toml: -------------------------------------------------------------------------------- 1 | name = "Geekdoc" 2 | license = "MIT" 3 | licenselink = "https://github.com/thegeeklab/hugo-geekdoc/blob/main/LICENSE" 4 | description = "Hugo theme made for documentation" 5 | homepage = "https://geekdocs.de/" 6 | demosite = "https://geekdocs.de/" 7 | tags = ["docs", "documentation", "responsive", "simple"] 8 | min_version = "0.124" 9 | 10 | [author] 11 | name = "Robert Kaussow" 12 | homepage = "https://thegeeklab.de/" 13 | -------------------------------------------------------------------------------- /layouts/shortcodes/tab.html: -------------------------------------------------------------------------------- 1 | {{- if .Parent }} 2 | {{- $name := .Get 0 }} 3 | {{- $group := printf "tabs-%s" (.Parent.Get 0) }} 4 | 5 | {{- if not (.Parent.Scratch.Get $group) }} 6 | {{- .Parent.Scratch.Set $group slice }} 7 | {{- end }} 8 | 9 | {{- .Parent.Scratch.Add $group (dict "Name" $name "Content" .Inner) }} 10 | {{- else }} 11 | {{ errorf "%q: 'tab' shortcode must be inside 'tabs' shortcode" .Page.Path }} 12 | {{- end }} 13 | -------------------------------------------------------------------------------- /src/icons/dangerous.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | dangerous 4 | 5 | 6 | -------------------------------------------------------------------------------- /layouts/partials/utils/featured.html: -------------------------------------------------------------------------------- 1 | {{ $img := "" }} 2 | 3 | {{ with $source := ($.Resources.ByType "image").GetMatch "{*feature*,*cover*,*thumbnail*}" }} 4 | {{ $featured := .Fill (printf "1200x630 %s" (default "Smart" .Params.anchor)) }} 5 | {{ $img = $featured.Permalink }} 6 | {{ else }} 7 | {{ with default $.Site.Params.images $.Params.images }} 8 | {{ $img = index . 0 | absURL }} 9 | {{ end }} 10 | {{ end }} 11 | 12 | {{ return $img }} 13 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-codeblock-mermaid.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if not (.Page.Scratch.Get "mermaid") }} 3 | 4 | 5 | {{ .Page.Scratch.Set "mermaid" true }} 6 | {{ end }} 7 | 8 | 9 |
10 |   {{- .Inner -}}
11 | 
12 | -------------------------------------------------------------------------------- /src/icons/bookmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | bookmark 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/initial-release.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Initial release 3 | type: posts 4 | date: 2020-01-08 5 | --- 6 | 7 | This is the first release of the Geekdoc theme. 8 | 9 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo. 10 | -------------------------------------------------------------------------------- /layouts/shortcodes/mermaid.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if not (.Page.Scratch.Get "mermaid") }} 3 | 4 | 5 | {{ .Page.Scratch.Set "mermaid" true }} 6 | {{ end }} 7 | 8 | 9 |
10 |   {{- .Inner -}}
11 | 
12 | -------------------------------------------------------------------------------- /src/icons/brightness_light.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | brightness_light 4 | 5 | 6 | -------------------------------------------------------------------------------- /layouts/partials/utils/description.html: -------------------------------------------------------------------------------- 1 | {{ $isPage := or (and (ne .Type "posts") (in "section page" .Kind )) (and (eq .Type "posts") (eq .Kind "page")) }} 2 | {{ $description := "" }} 3 | 4 | {{ if .Description }} 5 | {{ $description = .Description }} 6 | {{ else }} 7 | {{ if $isPage }} 8 | {{ $description = .Summary }} 9 | {{ else if .Site.Params.description }} 10 | {{ $description = .Site.Params.description }} 11 | {{ end }} 12 | {{ end }} 13 | 14 | {{ return $description }} 15 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-link.html: -------------------------------------------------------------------------------- 1 | {{- $raw := or (hasPrefix .Text " 12 | {{- .Text | safeHTML -}} 13 | 14 | {{- /* Drop trailing newlines */ -}} 15 | -------------------------------------------------------------------------------- /layouts/shortcodes/columns.html: -------------------------------------------------------------------------------- 1 | {{- $size := default "regular" (.Get "size" | lower) }} 2 | 3 | {{- if not (in (slice "regular" "large" "small") $size) }} 4 | {{- $size = "regular" }} 5 | {{- end }} 6 | 7 | 8 |
9 | {{- range split .Inner "<--->" }} 10 |
11 | {{ . | $.Page.RenderString -}} 12 |
13 | {{- end }} 14 |
15 | -------------------------------------------------------------------------------- /layouts/shortcodes/toc.html: -------------------------------------------------------------------------------- 1 | {{- $format := default "html" (.Get "format") }} 2 | {{- $tocLevels := default (default 6 .Site.Params.geekdocToC) .Page.Params.geekdocToC }} 3 | 4 | {{- if and $tocLevels .Page.TableOfContents -}} 5 | {{- if not (eq ($format | lower) "raw") -}} 6 |
7 | {{ .Page.TableOfContents }} 8 |
9 |
10 | {{- else -}} 11 | {{ .Page.TableOfContents }} 12 | {{- end -}} 13 | {{- end -}} 14 | -------------------------------------------------------------------------------- /src/icons/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | copy 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | heart 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/brightness_auto.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | brightness_auto 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/info_outline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | info_outline 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/notification.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | notification 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/error_outline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | error_outline 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-propertylist.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: name 4 | type: string 5 | description: Name of the file from the `data/properties/` directory. 6 | required: true 7 | - name: sort 8 | type: string 9 | description: Field name to use for sorting. 10 | required: false 11 | - name: order 12 | type: string 13 | description: Sort order, only applied if `sort` is set. Supported values are `asc|desc`. 14 | required: false 15 | defaultValue: asc 16 | -------------------------------------------------------------------------------- /src/icons/check_circle_outline.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | check_circle_outline 4 | 5 | 6 | -------------------------------------------------------------------------------- /layouts/posts/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 |
4 |

{{ partial "utils/title" . }}

5 | 8 |
9 |
10 | {{ partial "utils/content" . }} 11 |
12 |
13 | {{ end }} 14 | -------------------------------------------------------------------------------- /layouts/shortcodes/expand.html: -------------------------------------------------------------------------------- 1 | {{ $id := substr (sha1 .Inner) 0 8 }} 2 |
3 | 7 | 8 |
9 | {{ .Inner | $.Page.RenderString }} 10 |
11 |
12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # local environments 2 | .swp 3 | .env* 4 | /dist/ 5 | /build/ 6 | /node_modules/ 7 | /lhci_reports/ 8 | /exampleSite/themes/ 9 | /exampleSite/public/ 10 | /exampleSite/config/development/ 11 | CHANGELOG.md 12 | VERSION 13 | 14 | # translation envs 15 | exampleSite/content/de 16 | 17 | # auto-generated files 18 | /data/ 19 | /static/ 20 | /assets/sprites/ 21 | /resources/ 22 | /exampleSite/resources/ 23 | /exampleSite/data/sprites/ 24 | VERSION 25 | 26 | # hugo 27 | .hugo_build.lock 28 | 29 | # testing 30 | .lighthouseci/ 31 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-hints.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: type 4 | type: string 5 | description: Type of the hint. Supported values are `note|tip|important|caution|warning`. 6 | required: false 7 | defaultValue: note 8 | - name: icon 9 | type: string 10 | description: Icon to use. The value need to be an icon from an [SVG sprite](/features/icon-sets/). 11 | required: false 12 | - name: title 13 | type: string 14 | description: Title text of the hint. 15 | required: false 16 | -------------------------------------------------------------------------------- /src/icons/shield.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | shield 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | search 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/search/config.json: -------------------------------------------------------------------------------- 1 | {{- $searchDataFile := printf "search/%s.data.json" .Language.Lang -}} 2 | {{- $searchData := resources.Get "search/data.json" | resources.ExecuteAsTemplate $searchDataFile . | resources.Minify -}} 3 | { 4 | "dataFile": {{ $searchData.RelPermalink | jsonify }}, 5 | "indexConfig": {{ .Site.Params.geekdocSearchConfig | jsonify }}, 6 | "showParent": {{ if .Site.Params.geekdocSearchShowParent }}true{{ else }}false{{ end }}, 7 | "showDescription": {{ if .Site.Params.geekdocSearchShowDescription }}true{{ else }}false{{ end }} 8 | } 9 | -------------------------------------------------------------------------------- /src/icons/brightness_dark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | brightness_dark 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/gitlab.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | gitlab 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/search/data.json: -------------------------------------------------------------------------------- 1 | [ 2 | {{ range $index, $page := (where .Site.Pages "Params.geekdocProtected" "ne" true) }} 3 | {{ if ne $index 0 }},{{ end }} 4 | { 5 | "id": {{ $index }}, 6 | "href": "{{ $page.RelPermalink }}", 7 | "title": {{ (partial "utils/title" $page) | jsonify }}, 8 | "parent": {{ with $page.Parent }}{{ (partial "utils/title" .) | jsonify }}{{ else }}""{{ end }}, 9 | "content": {{ $page.Plain | jsonify }}, 10 | "description": {{ $page.Summary | plainify | jsonify }} 11 | } 12 | {{ end }} 13 | ] 14 | -------------------------------------------------------------------------------- /src/icons/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | link 4 | 5 | 6 | -------------------------------------------------------------------------------- /src/icons/timer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | timer 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-toc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: format 4 | type: string 5 | description: | 6 | Format of the returned ToC. The `html` format creates an HTML wrapper to enable the `geekdocToC` parameter that limits 7 | the maximum ToC level to be displayed. This variant also automatically inserts a horizontal line after the ToC. The `raw` format 8 | returns the unformatted ToC, the parameter `geekdocToC` does not work in this mode. Supported values are `html|raw`. 9 | required: false 10 | defaultValue: html 11 | -------------------------------------------------------------------------------- /src/icons/date.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | date 4 | 5 | 6 | -------------------------------------------------------------------------------- /layouts/partials/head/meta.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ hugo.Generator }} 6 | 7 | {{ $keywords := default .Site.Params.Keywords .Keywords }} 8 | 9 | {{- with partial "utils/description" . }} 10 | 11 | {{- end }} 12 | {{- with $keywords }} 13 | 14 | {{- end }} 15 | -------------------------------------------------------------------------------- /exampleSite/layouts/shortcodes/sprites.html: -------------------------------------------------------------------------------- 1 |
2 | {{ range $key, $value := .Site.Data.sprites.geekdoc }} 3 |
4 |
5 | 6 |
7 |
8 | #{{ (replace $key "_" "_") | safeHTML }} 9 |
10 |
11 | {{ end }} 12 |
13 | -------------------------------------------------------------------------------- /eslint.config.js: -------------------------------------------------------------------------------- 1 | import eslint from "@eslint/js" 2 | import globals from "globals" 3 | import babelParser from "@babel/eslint-parser" 4 | import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended" 5 | 6 | export default [ 7 | eslint.configs.recommended, 8 | { 9 | languageOptions: { 10 | globals: { 11 | ...globals.browser 12 | }, 13 | parser: babelParser, 14 | ecmaVersion: 2022, 15 | sourceType: "module", 16 | parserOptions: { 17 | requireConfigFile: false 18 | } 19 | } 20 | }, 21 | eslintPluginPrettierRecommended 22 | ] 23 | -------------------------------------------------------------------------------- /layouts/partials/page-metadata.html: -------------------------------------------------------------------------------- 1 | {{- $showPageLastmod := (or (default false .Page.Params.geekdocPageLastmod) (default false .Site.Params.geekdocPageLastmod)) -}} 2 | 3 | {{- if $showPageLastmod -}} 4 | 5 | 6 | 12 | 13 | {{- end -}} 14 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-images.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: name 4 | type: string 5 | description: Name of the image resource defined in page front matter. 6 | required: true 7 | - name: alt 8 | type: string 9 | description: Description text for the image. 10 | required: false 11 | - name: size 12 | type: string 13 | description: Thumbnail size. Supported values are `origin|tiny|small|medium|large`. 14 | required: false 15 | - name: lazy 16 | type: bool 17 | description: Enable/disable lazy loading for the image. 18 | required: false 19 | defaultValue: true 20 | -------------------------------------------------------------------------------- /layouts/shortcodes/include.html: -------------------------------------------------------------------------------- 1 | {{ $file := .Get "file" }} 2 | {{ $page := .Site.GetPage $file }} 3 | {{ $type := .Get "type" }} 4 | {{ $language := .Get "language" }} 5 | {{ $options :=.Get "options" }} 6 | 7 | 8 |
9 | {{- if (.Get "language") -}} 10 | {{- highlight ($file | readFile) $language (default "linenos=table" $options) -}} 11 | {{- else if eq $type "html" -}} 12 | {{- $file | readFile | safeHTML -}} 13 | {{- else if eq $type "page" -}} 14 | {{- with $page }}{{ .Content }}{{ end -}} 15 | {{- else -}} 16 | {{- $file | readFile | $.Page.RenderString -}} 17 | {{- end -}} 18 |
19 | -------------------------------------------------------------------------------- /layouts/shortcodes/hint.html: -------------------------------------------------------------------------------- 1 | {{- $type := default "note" (.Get "type") }} 2 | {{- $icon := .Get "icon" }} 3 | {{- $title := default ($type | title) (.Get "title") }} 4 | 5 | 6 |
7 |
8 | {{- with $icon -}} 9 | 10 | {{ $title }} 11 | {{- else -}} 12 | 13 | {{ $title }} 14 | {{- end -}} 15 |
16 |
{{ .Inner | $.Page.RenderString }}
17 |
18 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-avatar.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: name 4 | type: string 5 | description: Name of the image resource defined in page front matter. 6 | required: true 7 | - name: alt 8 | type: string 9 | description: Description text for the image. 10 | required: false 11 | - name: size 12 | type: string 13 | description: Thumbnail size. Supported values are `origin|tiny|small|medium|large`. 14 | required: false 15 | - name: anchor 16 | type: string 17 | description: "[Anchor](https://gohugo.io/content-management/image-processing/#anchor) to determine the placement of the crop box." 18 | required: false 19 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-progress.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: type 4 | type: string 5 | description: Color type of the progress bar. Supported values are `main|note|tip|important|caution|warning`. 6 | required: false 7 | defaultValue: main 8 | - name: value 9 | type: integer 10 | description: Progress value. 11 | required: false 12 | defaultValue: 0 13 | - name: icon 14 | type: string 15 | description: Icon to use. The value need to be an icon from an [SVG sprite](/features/icon-sets/). 16 | required: false 17 | - name: title 18 | type: string 19 | description: Title text of the progress bar. 20 | required: false 21 | -------------------------------------------------------------------------------- /src/icons/cloud_off.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | cloud_off 4 | 5 | 6 | -------------------------------------------------------------------------------- /layouts/partials/microformats/twitter_cards.html: -------------------------------------------------------------------------------- 1 | {{- with partial "utils/featured" . }} 2 | 3 | {{- else }} 4 | 5 | {{- end }} 6 | 7 | {{- with partial "utils/featured" . }} 8 | 9 | {{- end }} 10 | {{- with partial "utils/description" . }} 11 | 12 | {{- end }} 13 | {{- with .Site.Params.twitter -}} 14 | 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /layouts/shortcodes/tabs.html: -------------------------------------------------------------------------------- 1 | {{- if .Inner }}{{ end }} 2 | {{- $id := .Get 0 }} 3 | {{- $group := printf "tabs-%s" $id }} 4 | 5 | 6 |
7 | {{- range $index, $tab := .Scratch.Get $group }} 8 | 15 | 18 |
19 | {{ .Content | $.Page.RenderString }} 20 |
21 | {{- end }} 22 |
23 | -------------------------------------------------------------------------------- /layouts/shortcodes/katex.html: -------------------------------------------------------------------------------- 1 | 2 | {{ if not (.Page.Scratch.Get "katex") }} 3 | 4 | 8 | 9 | {{ .Page.Scratch.Set "katex" true }} 10 | {{ end }} 11 | 12 | 13 | 14 | {{ cond (in .Params "display") "\\[" "\\(" -}} 15 | {{- trim .Inner "\n" -}} 16 | {{- cond (in .Params "display") "\\]" "\\)" -}} 17 | 18 | {{- /* Drop trailing newlines */ -}} 19 | -------------------------------------------------------------------------------- /exampleSite/content/en/usage/customization.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Customization 3 | --- 4 | 5 | {{< toc >}} 6 | 7 | ## Custom resources 8 | 9 | To add custom resources to your site e.g. CSS or JavaScript files, create the `layouts/partials/head/custom.html` in the root directory of your project. Add the source files you want to include in the `static/` folder of your project, for example `static/css/custom.css` and `static/js/custom.js`. To include the files in your site, add the following code to `layouts/partials/head/custom.html`: 10 | 11 | ```html 12 | 13 | 14 | ``` 15 | 16 | Ensure to use the absolute path to the files. 17 | -------------------------------------------------------------------------------- /layouts/shortcodes/button.html: -------------------------------------------------------------------------------- 1 | {{- $ref := "" }} 2 | {{- $class := "" }} 3 | {{- $size := default "regular" (.Get "size" | lower) }} 4 | 5 | {{- if not (in (slice "regular" "large") $size) }} 6 | {{- $size = "regular" }} 7 | {{- end }} 8 | 9 | {{- with .Get "href" }} 10 | {{- $ref = . }} 11 | {{- end }} 12 | 13 | {{- with .Get "relref" }} 14 | {{- $ref = relref $ . }} 15 | {{- end }} 16 | 17 | {{- with .Get "class" }} 18 | {{- $class = . }} 19 | {{- end }} 20 | 21 | 22 | 23 | 27 | {{ $.Inner }} 28 | 29 | 30 | -------------------------------------------------------------------------------- /svgsprite.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "shape": { 3 | "id": { 4 | "generator": "gdoc_%s" 5 | }, 6 | "dimension": { 7 | "maxWidth": 22, 8 | "maxHeight": 22, 9 | "attributes": false 10 | }, 11 | "spacing": { 12 | "padding": 5, 13 | "box": "content" 14 | }, 15 | "dest": "build/icons" 16 | }, 17 | "svg": { 18 | "xmlDeclaration": false, 19 | "rootAttributes": { 20 | "class": "svg-sprite" 21 | } 22 | }, 23 | "mode": { 24 | "defs": { 25 | "dest": "build/sprites/", 26 | "sprite": "geekdoc.svg", 27 | "bust": false 28 | }, 29 | "stack": { 30 | "dest": "build/img/", 31 | "sprite": "geekdoc-stack.svg", 32 | "bust": false 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /exampleSite/data/menu/main.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | main: 3 | - name: 4 | en: Level 1 (EN) 5 | de: Level 1 (DE) 6 | sub: 7 | - name: 8 | en: Level 1.1 (EN) 9 | de: Level 1.1 (DE) 10 | ref: "/toc-tree/level-1/level-1-1" 11 | rel: me 12 | - name: Level 1.2 13 | ref: "/toc-tree/level-1/level-1-2" 14 | - name: Level 1.3 15 | ref: "/toc-tree/level-1/level-1-3" 16 | sub: 17 | - name: Level 1.3.1 18 | ref: "/toc-tree/level-1/level-1-3/level-1-3-1" 19 | - name: Level 2 20 | ref: "/toc-tree/level-2" 21 | sub: 22 | - name: Level 2.1 23 | ref: "/toc-tree/level-2/level-2-1" 24 | - name: Level 2.2 25 | ref: "/toc-tree/level-2/level-2-2" 26 | -------------------------------------------------------------------------------- /layouts/shortcodes/audio.html: -------------------------------------------------------------------------------- 1 | {{- $source := ($.Page.Resources.ByType "audio").GetMatch (printf "%s" (.Get "name")) }} 2 | {{- $customAlt := .Get "alt" }} 3 | 4 | 5 | {{- with $source }} 6 | {{- $caption := default .Title $customAlt }} 7 | 8 |
9 |
10 | 13 | {{- with $caption }} 14 |
15 | {{ . }} 16 | {{- with $source.Params.credits }} 17 | {{ printf " (%s)" . | $.Page.RenderString }} 18 | {{- end }} 19 |
20 | {{- end }} 21 |
22 |
23 | {{- end }} 24 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-buttons.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: href 4 | type: string 5 | description: The URL to use as target of the button. 6 | required: false 7 | - name: relref 8 | type: string 9 | description: Executes the [relref](https://gohugo.io/functions/urls/relref/) Hugo function to resolve the relative permalink of the specified page. The result is set as the target of the button. 10 | required: false 11 | - name: class 12 | type: list 13 | description: List of space-separated CSS class names to apply. 14 | required: false 15 | - name: size 16 | type: string 17 | description: Preset of different button sizes. Supported values are `regular|large`. 18 | required: false 19 | defaultValue: regular 20 | -------------------------------------------------------------------------------- /exampleSite/static/.htaccess: -------------------------------------------------------------------------------- 1 | ErrorDocument 404 /404.html 2 | 3 | ExpiresActive On 4 | ExpiresDefault "access plus 600 seconds" 5 | ExpiresByType text/css "access plus 1 week" 6 | ExpiresByType text/javascript "access plus 1 month" 7 | ExpiresByType text/html "access plus 1 seconds" 8 | ExpiresByType application/javascript "access plus 1 month" 9 | ExpiresByType application/x-javascript "access plus 1 month" 10 | ExpiresByType image/gif "access plus 1 week" 11 | ExpiresByType image/jpeg "access plus 1 week" 12 | ExpiresByType image/png "access plus 1 week" 13 | ExpiresByType image/x-icon "access plus 1 month" 14 | ExpiresByType image/svg+xml "access plus 1 week" 15 | ExpiresByType application/x-font-woff "access plus 1 week" 16 | ExpiresByType application/font-woff2 "access plus 1 week" 17 | -------------------------------------------------------------------------------- /exampleSite/content/en/posts/hello_geekdoc.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hello Geekdoc 3 | type: posts 4 | date: 2020-01-06 5 | tags: 6 | - Documentation 7 | - Updates 8 | --- 9 | 10 | This is the first release of the Geekdoc theme. 11 | 12 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo. 13 | 14 | Amalia id per in minimum facility, quid facet modifier ea ma. Ill um select ma ad, en ferric patine sentient vim. Per expendable foreordained interpretations cu, maxim sole pertinacity in ram. Que no rota alters, ad sea sues exercise main rum, cu diam mas facility sea. 15 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/icons.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Icons 3 | --- 4 | 5 | Simple shortcode to include icons from SVG sprites outside of menus. 6 | 7 | ## Usage 8 | 9 | 10 | ```tpl 11 | {{}} 12 | ``` 13 | 14 | 15 | ## Example 16 | 17 | | Output | Code | 18 | | -------------------------- | -------------------------------- | 19 | | {{< icon "thumbs-up" >}} | `{{}}` | 20 | | {{< icon "thumbs-down" >}} | `{{}}` | 21 | | {{< icon "laugh" >}} | `{{}}` | 22 | | {{< icon "lemon" >}} | `{{}}` | 23 | | {{< icon "moon" >}} | `{{}}` | 24 | -------------------------------------------------------------------------------- /exampleSite/config/_default/config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | baseURL: https://geekdocs.de/ 3 | title: Geekdocs 4 | theme: hugo-geekdoc 5 | 6 | pygmentsUseClasses: true 7 | pygmentsCodeFences: true 8 | timeout: 180000 9 | pluralizeListTitles: false 10 | 11 | defaultContentLanguage: en 12 | 13 | disablePathToLower: true 14 | enableGitInfo: true 15 | 16 | enableRobotsTXT: true 17 | 18 | markup: 19 | goldmark: 20 | renderer: 21 | unsafe: true 22 | tableOfContents: 23 | startLevel: 1 24 | endLevel: 9 25 | 26 | taxonomies: 27 | tag: tags 28 | 29 | outputs: 30 | home: 31 | - HTML 32 | page: 33 | - HTML 34 | section: 35 | - HTML 36 | taxonomy: 37 | - HTML 38 | term: 39 | - HTML 40 | 41 | security: 42 | exec: 43 | allow: 44 | - "^git$" 45 | - "^asciidoctor$" 46 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/toc-tree.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ToC-Tree 3 | --- 4 | 5 | The `toc-tree` shortcode will generate a Table of Content from a section file tree of your content directory. The root of the resulting ToC will be the page on which you define the shortcode. 6 | 7 | ## Usage 8 | 9 | 10 | ```tpl 11 | {{}} 12 | ``` 13 | 14 | 15 | ### Attributes 16 | 17 | 18 | 19 | {{< propertylist name=shortcode-toc-tree sort=name order=asc >}} 20 | 21 | 22 | 23 | ## Example 24 | 25 | As said, the root will be the site on which the shortcode was used, you can see a demo including nesting in the [ToC Tree](/toc-tree/) section. 26 | -------------------------------------------------------------------------------- /layouts/shortcodes/progress.html: -------------------------------------------------------------------------------- 1 | {{- $value := default 0 (.Get "value") -}} 2 | {{- $type := default "main" (.Get "type") }} 3 | {{- $title := .Get "title" -}} 4 | {{- $icon := .Get "icon" -}} 5 | 6 | 7 |
8 |
9 |
10 | {{ with $icon -}} 11 | 12 | {{- end }} 13 | {{ with $title }}{{ . }}{{ end }} 14 |
15 |
{{ $value }}%
16 |
17 |
18 |
23 |
24 |
25 | -------------------------------------------------------------------------------- /exampleSite/data/properties/shortcode-includes.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: file 4 | type: string 5 | description: Path of the file (relative to the Hugo root) to include. 6 | required: true 7 | - name: language 8 | type: string 9 | description: Language for [syntax highlighting](https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages). 10 | required: false 11 | - name: type 12 | type: string 13 | description: Special include type. Supported values are `html|page`. If not set the included file is rendered as markdown. 14 | required: false 15 | - name: options 16 | type: bool 17 | description: highlighting [options](https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode). 18 | required: false 19 | defaultValue: linenos=table 20 | -------------------------------------------------------------------------------- /src/icons/home.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | home 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/data/properties/demo.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | properties: 3 | - name: prop1 4 | type: string 5 | description: Dummy description of the prop1 string property. 6 | required: true 7 | 8 | - name: prop2 9 | type: int 10 | defaultValue: 10 11 | description: 12 | en: Another description for the integer property called prop2. 13 | required: false 14 | tags: 15 | en: 16 | - tag1 17 | - tag2 18 | 19 | - name: prop3 20 | type: bool 21 | defaultValue: false 22 | description: | 23 | A `bool` property with a complex multiline description and embedded Markdown: 24 | 25 | - List item 1 26 | - List item 2 27 | 28 | More description how to use this property. 29 | required: false 30 | 31 | - name: a-prop 32 | type: string 33 | description: Property to demonstrate sorting. 34 | required: true 35 | -------------------------------------------------------------------------------- /src/icons/git.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | git 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/config/_default/params.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # cspell:ignore socialmedia2 3 | 4 | description: > 5 | Geekdoc is a simple Hugo theme for documentations. It is intentionally designed as a fast and lean theme 6 | and may not fit the requirements of complex projects. If a more feature-complete theme is required 7 | there are a lot of good alternatives out there. 8 | images: 9 | - "socialmedia2.png" 10 | 11 | geekdocToC: 3 12 | geekdocTagsToMenu: true 13 | 14 | geekdocRepo: https://github.com/thegeeklab/hugo-geekdoc 15 | geekdocEditPath: edit/main/exampleSite 16 | geekdocPageLastmod: false 17 | 18 | geekdocSearch: true 19 | geekdocSearchShowParent: true 20 | geekdocSearchShowDescription: true 21 | 22 | geekdocLegalNotice: https://thegeeklab.de/legal-notice/#contact-information 23 | geekdocPrivacyPolicy: https://thegeeklab.de/legal-notice/#privacy-policy 24 | 25 | geekdocImageLazyLoading: true 26 | geekdocDarkModeDim: true 27 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/avatar/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Avatar 3 | resources: 4 | - name: avatar 5 | src: "avatar.jpg" 6 | title: "Avatar" 7 | --- 8 | 9 | The avatar shortcode is another custom image shortcode. 10 | 11 | 12 | 13 | ## Usage 14 | 15 | Define a resource in the page front matter. 16 | 17 | 18 | 19 | ```md 20 | --- 21 | resources: 22 | - name: avatar 23 | src: "images/avatar.jpg" 24 | title: "Avatar" 25 | --- 26 | 27 | {{}} 28 | ``` 29 | 30 | 31 | 32 | ## Attributes 33 | 34 | 35 | 36 | {{< propertylist name=shortcode-avatar sort=name order=asc >}} 37 | 38 | 39 | 40 | ## Example 41 | 42 | 43 | 44 | {{< avatar name=avatar size="small" >}} 45 | 46 | 47 | -------------------------------------------------------------------------------- /layouts/partials/pagination.html: -------------------------------------------------------------------------------- 1 | {{ $page := $.Paginator }} 2 | 3 | 4 | 23 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/katex.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: KaTeX 3 | # cspell:ignore infty 4 | --- 5 | 6 | [KaTeX](https://katex.org/) shortcode let you render math typesetting in markdown document. 7 | 8 | ## Usage 9 | 10 | ```latex 11 | {{}} 12 | f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi 13 | {{}} 14 | ``` 15 | 16 | ### Attributes 17 | 18 | 19 | 20 | {{< propertylist name=shortcode-katex sort=name order=asc >}} 21 | 22 | 23 | 24 | ## Example 25 | 26 | 27 | 28 | {{< katex display >}} 29 | f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi 30 | {{< /katex >}} 31 | 32 | 33 | 34 | KaTeX can be used inline, for example {{< katex >}}\pi(x){{< /katex >}} or used with the `display` parameter as above. 35 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/buttons.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Buttons 3 | --- 4 | 5 | Buttons are styled links that can lead to local page or external link. 6 | 7 | ## Usage 8 | 9 | 10 | ```tpl 11 | {{}}Get Home{{}} 12 | {{}}Contribute{{}} 13 | ``` 14 | 15 | ### Attributes 16 | 17 | 18 | 19 | {{< propertylist name=shortcode-buttons sort=name order=asc >}} 20 | 21 | 22 | 23 | ## Example 24 | 25 | 26 | 27 | 28 | {{< button relref="/" >}}Get Home{{< /button >}} 29 | {{< button href="https://github.com/thegeeklab/hugo-geekdoc" >}}Contribute{{< /button >}} 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/icons/code.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | code 4 | 5 | 6 | -------------------------------------------------------------------------------- /layouts/partials/search.html: -------------------------------------------------------------------------------- 1 | {{ if default true .Site.Params.geekdocSearch }} 2 | 3 | {{- $searchConfigFile := printf "search/%s.config.json" .Language.Lang -}} 4 | {{- $searchConfig := resources.Get "search/config.json" | resources.ExecuteAsTemplate $searchConfigFile . | resources.Minify -}} 5 | {{- $searchConfig.Publish -}} 6 | 7 | 21 | {{ end }} 22 | -------------------------------------------------------------------------------- /src/sass/_print.scss: -------------------------------------------------------------------------------- 1 | @use "defaults"; 2 | 3 | @media print { 4 | .gdoc-nav, 5 | .gdoc-footer .container span:not(:first-child), 6 | .gdoc-paging, 7 | .editpage { 8 | display: none; 9 | } 10 | 11 | .gdoc-footer { 12 | border-top: defaults.$border-1 solid defaults.$gray-300; 13 | } 14 | 15 | .gdoc-markdown pre { 16 | white-space: pre-wrap; 17 | overflow-wrap: break-word; 18 | } 19 | 20 | .chroma code { 21 | border: defaults.$border-1 solid defaults.$gray-300; 22 | padding: defaults.$padding-8 !important; 23 | font-weight: normal !important; 24 | } 25 | 26 | .gdoc-markdown code { 27 | font-weight: bold; 28 | } 29 | 30 | a, 31 | a:visited { 32 | color: inherit !important; 33 | text-decoration: none !important; 34 | } 35 | 36 | .gdoc-toc { 37 | flex: none; 38 | 39 | nav { 40 | position: relative; 41 | width: auto; 42 | } 43 | } 44 | 45 | .wrapper { 46 | display: block; 47 | 48 | main { 49 | display: block; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/icons/language.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | language 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/progress.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Progress 3 | --- 4 | 5 | A progress bar shows how far a process has progressed. 6 | 7 | ## Usage 8 | 9 | 10 | ```tpl 11 | {{}} 12 | ``` 13 | 14 | ### Attributes 15 | 16 | 17 | 18 | {{< propertylist name=shortcode-progress sort=name order=asc >}} 19 | 20 | 21 | 22 | ## Example 23 | 24 | 25 | 26 | {{< progress title=Eating value=65 icon=gdoc_heart >}} 27 | 28 | {{< progress title="Type: note" value=10 icon=gdoc_heart type=note >}} 29 | 30 | {{< progress title="Type: tip" value=70 icon=gdoc_heart type=tip >}} 31 | 32 | {{< progress title="Type: important" value=30 icon=gdoc_heart type=important >}} 33 | 34 | {{< progress title="Type: caution" value=90 icon=gdoc_heart type=caution >}} 35 | 36 | {{< progress title="Type: warning" value=80 icon=gdoc_heart type=warning >}} 37 | 38 | 39 | -------------------------------------------------------------------------------- /.cspell.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2", 3 | "language": "en", 4 | "dictionaries": ["en_us", "softwareTerms", "companies", "bash", "html", "css", "typescript"], 5 | "words": [ 6 | "geekdoc", 7 | "katex", 8 | "flexsearch", 9 | "pygments", 10 | "Geekdocs", 11 | "goldmark", 12 | "THEMEDIR", 13 | "gohugo", 14 | "canonify", 15 | "codecopy", 16 | "lstore", 17 | "lntable", 18 | "lastmod", 19 | "Preproc", 20 | "lntd", 21 | "Emph", 22 | "anchorwrap", 23 | "languagecode", 24 | "relref", 25 | "linenos", 26 | "admonitionblock", 27 | "uuidv4", 28 | "cfworker", 29 | "readmore", 30 | "editpage", 31 | "codecontainer", 32 | "necolas", 33 | "Shpak", 34 | "Kaussow" 35 | ], 36 | "ignorePaths": [ 37 | ".woodpecker", 38 | ".cspell.json", 39 | ".git", 40 | ".gitignore", 41 | ".vscode", 42 | "*.svg", 43 | "renovate.json", 44 | "package.json", 45 | "config.yaml", 46 | "webpack.config.js", 47 | "theme.toml", 48 | "svgsprite.config.json", 49 | "i18n/*" 50 | ], 51 | 52 | "ignoreRegExpList": ["&\\S+;", "{{.+}}"] 53 | } 54 | -------------------------------------------------------------------------------- /src/icons/mastodon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | mastodon 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/asciidoc/admonition-icons.adoc: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Admonition Icons" 3 | +++ 4 | 5 | :icons: font 6 | 7 | By default, the admonition is rendered with a plain text label. To enable font icons the document attribute `:icons: font` need to be set. 8 | 9 | == Example 10 | 11 | [NOTE] 12 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 13 | Ornateness bland it ex enc, est yeti am bongo detract re. 14 | 15 | [TIP] 16 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 17 | Ornateness bland it ex enc, est yeti am bongo detract re. 18 | 19 | [IMPORTANT] 20 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 21 | Ornateness bland it ex enc, est yeti am bongo detract re. 22 | 23 | [CAUTION] 24 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 25 | Ornateness bland it ex enc, est yeti am bongo detract re. 26 | 27 | [WARNING] 28 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 29 | Ornateness bland it ex enc, est yeti am bongo detract re. 30 | -------------------------------------------------------------------------------- /src/js/mermaid.js: -------------------------------------------------------------------------------- 1 | import Storage from "store2" 2 | import { v4 as uuidv4 } from "uuid" 3 | import { COLOR_THEME_DARK, THEME, COLOR_THEME_AUTO } from "./config.js" 4 | 5 | import mermaid from "mermaid" 6 | 7 | document.addEventListener("DOMContentLoaded", function () { 8 | let lstore = Storage.namespace(THEME) 9 | let currentMode = lstore.get("color-theme") || COLOR_THEME_AUTO 10 | let darkModeQuery = window.matchMedia("(prefers-color-scheme: dark)") 11 | let darkMode = false 12 | let theme = "default" 13 | 14 | if ( 15 | currentMode === COLOR_THEME_DARK || 16 | (currentMode === COLOR_THEME_AUTO && darkModeQuery.matches) 17 | ) { 18 | darkMode = true 19 | theme = "dark" 20 | } 21 | 22 | mermaid.initialize({ 23 | startOnLoad: false, 24 | flowchart: { useMaxWidth: true }, 25 | theme: theme, 26 | themeVariables: { 27 | darkMode: darkMode 28 | } 29 | }) 30 | 31 | document.querySelectorAll(".mermaid").forEach(function (el) { 32 | let id = "graph-" + uuidv4() 33 | 34 | mermaid.render(id, el.innerText).then(({ svg, bindFunctions }) => { 35 | el.innerHTML = svg 36 | bindFunctions?.(el) 37 | }) 38 | }) 39 | }) 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Robert Kaussow 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is furnished 10 | to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice (including the next 13 | paragraph) shall be included in all copies or substantial portions of the 14 | Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 19 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 20 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 21 | OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /layouts/_default/_markup/render-heading.html: -------------------------------------------------------------------------------- 1 | {{- $showAnchor := (and (default true .Page.Params.geekdocAnchor) (default true .Page.Site.Params.geekdocAnchor)) -}} 2 | 3 | 4 | 5 | {{- if $showAnchor -}} 6 |
7 | 11 | {{ .Text | safeHTML }} 12 | 13 | 14 | 15 | 16 |
17 | {{- else -}} 18 |
19 | 23 | {{ .Text | safeHTML }} 24 | 25 |
26 | {{- end -}} 27 | 28 | -------------------------------------------------------------------------------- /src/sass/_chroma_base.scss: -------------------------------------------------------------------------------- 1 | @use "defaults"; 2 | 3 | @mixin chroma_base { 4 | .chroma { 5 | color: var(--code-font-color); 6 | } 7 | .chroma .lntable td:nth-child(2) code .hl { 8 | width: auto; 9 | margin-left: -0.5em; 10 | padding: 0 0.5em; 11 | } 12 | 13 | .highlight { 14 | pre.chroma { 15 | width: 100%; 16 | overflow: auto; 17 | max-height: var(--code-max-height); 18 | } 19 | } 20 | 21 | /* LineTable */ 22 | .chroma .lntable { 23 | border-radius: defaults.$border-radius; 24 | border-spacing: 0; 25 | padding: 0; 26 | margin: 0; 27 | width: 100%; 28 | display: block; 29 | max-height: var(--code-max-height); 30 | overflow: auto; 31 | 32 | pre.chroma { 33 | max-height: none; 34 | border-radius: 0; 35 | margin: 0; 36 | } 37 | } 38 | .chroma .lntable td:first-child { 39 | code { 40 | background-color: var(--code-accent-color-lite); 41 | font-size: defaults.$font-size-12; 42 | padding-left: 0; 43 | padding-right: 0; 44 | border-radius: 0; 45 | } 46 | } 47 | .chroma .lntable td:nth-child(2) { 48 | width: 100%; 49 | margin-left: defaults.$padding-32; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /.gitsv/config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: "1.1" 3 | 4 | versioning: 5 | update-major: [] 6 | update-minor: [feat] 7 | update-patch: [fix, perf, refactor, chore, test, ci, docs] 8 | 9 | tag: 10 | pattern: "v%d.%d.%d" 11 | 12 | release-notes: 13 | sections: 14 | - name: Features 15 | commit-types: [feat] 16 | section-type: commits 17 | - name: Bug Fixes 18 | commit-types: [fix] 19 | section-type: commits 20 | - name: Performance Improvements 21 | commit-types: [perf] 22 | section-type: commits 23 | - name: Code Refactoring 24 | commit-types: [refactor] 25 | section-type: commits 26 | - name: Others 27 | commit-types: [chore] 28 | section-type: commits 29 | - name: Testing 30 | commit-types: [test] 31 | section-type: commits 32 | - name: CI Pipeline 33 | commit-types: [ci] 34 | section-type: commits 35 | - name: Documentation 36 | commit-types: [docs] 37 | section-type: commits 38 | - name: BREAKING CHANGES 39 | section-type: breaking-changes 40 | 41 | commit-message: 42 | footer: 43 | issue: 44 | key: issue 45 | add-value-prefix: "#" 46 | issue: 47 | regex: "#?[0-9]+" 48 | -------------------------------------------------------------------------------- /src/icons/fire.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | fire 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/propertylist.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Properties 3 | --- 4 | 5 | The property list shortcode creates a custom HTML description list that can be used to display properties or variables and general dependent information. The shortcode requires a data file in `data/properties/`, e.g. `data/properties/demo.yaml`. 6 | 7 | ## Usage 8 | 9 | 10 | ```tpl 11 | {{}} 12 | ``` 13 | 14 | 15 | The supported attributes can be taken from the following example: 16 | 17 | 18 | 19 | {{< include file="/data/properties/demo.yaml" language="Yaml" options="linenos=table" >}} 20 | 21 | 22 | 23 | ### Attributes 24 | 25 | 26 | 27 | {{< propertylist name=shortcode-buttons sort=name order=asc >}} 28 | 29 | 30 | 31 | ## Example 32 | 33 | 34 | 35 | {{< propertylist name=demo sort=name order=asc >}} 36 | 37 | 38 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/expand.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Expand 3 | --- 4 | 5 | Expand shortcode can help to decrease clutter on screen by hiding part of text. Expand content by clicking on it. 6 | 7 | ## Usage 8 | 9 | ```tpl 10 | {{}} 11 | ### Markdown content 12 | Dolor sit, sumo unique ... 13 | {{}} 14 | ``` 15 | 16 | It is also possible to use a custom label and symbol. 17 | 18 | 19 | 20 | ```tpl 21 | {{}} 22 | ### More markdown 23 | Dolor sit, sumo unique ... 24 | {{}} 25 | ``` 26 | 27 | ## Example 28 | 29 | {{< expand >}} 30 | 31 | ### Markdown content 32 | 33 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. 34 | {{< /expand >}} 35 | 36 | {{< expand "Custom Label" "..." >}} 37 | 38 | ### More markdown 39 | 40 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates 41 | investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts 42 | feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious 43 | copious quo ad. Stet probates in duo. 44 | {{< /expand >}} 45 | -------------------------------------------------------------------------------- /layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 | {{ range .Paginator.Pages.ByTitle }} 4 |
5 |
6 |

7 | {{ partial "utils/title" . }} 8 |

9 |
10 | 11 |
12 | 13 | {{ $pageCount := len .Pages }} 14 | 15 | 18 | 19 | 20 | 21 | 22 | 23 | {{ $latest := index .Pages.ByDate 0 }} 24 | {{ with $latest }} 25 | {{ partial "utils/title" . }} 26 | {{ end }} 27 | 28 | 29 |
30 |
31 | {{ end }} 32 |
33 | {{ partial "pagination.html" . }} 34 | {{ end }} 35 | -------------------------------------------------------------------------------- /layouts/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ partial "head/meta" . }} 5 | {{ i18n "error_page_title" }} 6 | 7 | {{ partial "head/favicons" . }} 8 | {{ partial "head/others" . }} 9 | 10 | 11 | 12 | {{ partial "svg-icon-symbols" . }} 13 | 14 | 15 |
16 | {{ partial "site-header" (dict "Root" . "MenuEnabled" false) }} 17 | 18 | 19 |
20 |
21 |
22 | 23 |
24 |
25 |
{{ i18n "error_message_title" }}
26 |
{{ i18n "error_message_code" }}
27 |
28 | {{ i18n "error_message_text" .Site.Home.Permalink | safeHTML }} 29 |
30 |
31 |
32 |
33 | 34 | {{ partial "site-footer" . }} 35 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/audio/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Audio 3 | resources: 4 | - name: diamonds-trap 5 | src: "diamonds-trap.mp3" 6 | title: Diamonds Trap 7 | params: 8 | credits: "[Jakob Eglmeier on openmusic.academy CC0-1.0](https://openmusic.academy/media-library/b9do2E2ZwVCfppyBf2yuej)" 9 | # cspell:ignore Jakob Eglmeier openmusic 10 | --- 11 | 12 | The audio shortcode allows you to embed audio files. 13 | 14 | ## Usage 15 | 16 | Define your resources in the page front matter, custom parameter `params.credits` is optional. 17 | 18 | 19 | 20 | ```md 21 | --- 22 | resources: 23 | - name: diamonds-trap 24 | src: "diamonds-trap.mp3" 25 | title: Diamonds Trap 26 | params: 27 | credits: "[Jakob Eglmeier on openmusic.academy CC0-1.0](https://openmusic.academy/media-library/b9do2E2ZwVCfppyBf2yuej)" 28 | --- 29 | 30 | {{}} 31 | ``` 32 | 33 | ### Attributes 34 | 35 | 36 | 37 | {{< propertylist name=shortcode-audio sort=name order=asc >}} 38 | 39 | 40 | 41 | 42 | 43 | ## Example 44 | 45 | 46 | 47 | {{< audio name="diamonds-trap" >}} 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/icons/bitbucket.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | bitbucket 4 | 5 | 6 | -------------------------------------------------------------------------------- /.woodpecker/build-package.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | when: 3 | - event: [pull_request, tag] 4 | - event: [push, manual] 5 | branch: 6 | - ${CI_REPO_DEFAULT_BRANCH} 7 | 8 | steps: 9 | - name: assets 10 | image: docker.io/library/node:lts 11 | commands: 12 | - npm install --quiet --no-progress 13 | - npm run build 14 | - cat VERSION 15 | environment: 16 | FORCE_COLOR: "true" 17 | 18 | - name: package 19 | image: docker.io/library/node:lts 20 | commands: 21 | - npm run pack 22 | environment: 23 | FORCE_COLOR: "true" 24 | 25 | - name: checksum 26 | image: quay.io/thegeeklab/alpine-tools 27 | commands: 28 | - cd dist/ && sha256sum * > ../sha256sum.txt 29 | 30 | - name: changelog 31 | image: quay.io/thegeeklab/git-sv 32 | commands: 33 | - git sv current-version 34 | - git sv release-notes -t ${CI_COMMIT_TAG:-next} -o CHANGELOG.md 35 | - cat CHANGELOG.md 36 | 37 | - name: publish-github 38 | image: docker.io/plugins/github-release 39 | settings: 40 | api_key: 41 | from_secret: github_token 42 | files: 43 | - dist/* 44 | - sha256sum.txt 45 | note: CHANGELOG.md 46 | overwrite: true 47 | title: ${CI_COMMIT_TAG} 48 | when: 49 | - event: [tag] 50 | 51 | depends_on: 52 | - static 53 | -------------------------------------------------------------------------------- /src/icons/matrix.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | matrix 4 | 5 | 6 | -------------------------------------------------------------------------------- /i18n/zh-cn.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: 编辑页面 3 | 4 | nav_navigation: 导航 5 | nav_tags: 标签 6 | nav_more: 更多 7 | nav_top: 回到顶部 8 | 9 | form_placeholder_search: 搜索 10 | 11 | error_page_title: 迷路了? 不用担心 12 | error_message_title: 迷路了? 13 | error_message_code: 错误 404 14 | error_message_text: > 15 | 好像找不到你要找的东西。 别担心,我们可以 16 | 带您回到主页。 17 | 18 | button_toggle_dark: 切换暗/亮/自动模式 19 | button_nav_open: 打开导航 20 | button_nav_close: 关闭导航 21 | button_menu_open: 打开菜单栏 22 | button_menu_close: 关闭菜单栏 23 | button_homepage: 返回首页 24 | 25 | title_anchor_prefix: "锚定到:" 26 | 27 | posts_read_more: 阅读全文 28 | posts_read_time: 29 | one: "一分钟阅读时间" 30 | other: "{{ . }} 分钟阅读时间" 31 | posts_update_prefix: 更新时间 32 | posts_count: 33 | one: 一篇文章 34 | other: "{{ . }} 个帖子" 35 | posts_tagged_with: 所有带有“{{ . }}”标签的帖子。 36 | 37 | footer_build_with: > 38 | 基于 Hugo 39 | 制作 40 | footer_legal_notice: "法律声明" 41 | footer_privacy_policy: "隐私政策" 42 | footer_content_license_prefix: > 43 | 内容许可证 44 | 45 | language_switch_no_translation_prefix: "页面未翻译:" 46 | 47 | propertylist_required: 需要 48 | propertylist_optional: 可选 49 | propertylist_default: 默认值 50 | 51 | pagination_page_prev: 以前 52 | pagination_page_next: 下一个 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /exampleSite/content/en/features/dark-mode/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Dark Mode 3 | --- 4 | 5 | Say hello to the dark mode of the Geekdoc theme! 6 | 7 | [![Geekdoc in dark mode](images/geekdoc-dark.png)](images/geekdoc-dark.png) 8 | 9 | The dark mode can be used in two different ways. If you have JavaScript disabled in your browser, the dark mode automatically detects the preferred system settings via the `prefers-color-scheme` parameter. Depending on the value, the theme will automatically switch between dark and light mode if this feature is supported by your operating system and browser. 10 | 11 | The second mode requires JavaScript and is controlled by a dark mode switch in the upper right corner. You can switch between three modes: Auto, Dark and Light. Auto mode works the same as the first method mentioned above and automatically detects the system setting. Dark and Light modes allow you to force one of them for your Geekdoc page only, regardless of the system setting. This works even if your browser or operating system does not support the system setting. The current selection is stored locally via the Web Storage API. 12 | 13 | To avoid very bright spots often caused by images while using the dark mode we have added an optional auto-dim feature that can be enabled with the site parameter `geekdocDarkModeDim` (see [Configuration](/usage/configuration/)). As this may have an impact on the quality of the images it is disabled by default. 14 | -------------------------------------------------------------------------------- /i18n/ja.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: ページの編集 3 | 4 | nav_navigation: ナビゲーション 5 | nav_tags: タグ 6 | nav_more: さらに 7 | nav_top: トップへ戻る 8 | 9 | form_placeholder_search: 検索 10 | 11 | error_page_title: お困りですか?ご心配なく 12 | error_message_title: お困りですか? 13 | error_message_code: 404 エラー 14 | error_message_text: > 15 | お探しのものが見つからないようです。トップページ 16 | へ戻ることができるので、ご安心ください。 17 | 18 | button_toggle_dark: モードの切替 ダーク/ライト/自動 19 | button_nav_open: ナビゲーションを開く 20 | button_nav_close: ナビゲーションを閉じる 21 | button_menu_open: メニューバーを開く 22 | button_menu_close: メニューバーを閉じる 23 | button_homepage: トップページへ戻る 24 | 25 | title_anchor_prefix: "アンカー先:" 26 | 27 | posts_read_more: 全投稿を閲覧 28 | posts_read_time: 29 | one: "読むのに 1 分かかります" 30 | other: "読むのに要する時間 {{ . }} (分)" 31 | posts_update_prefix: 更新時刻 32 | posts_count: 33 | one: "一件の投稿" 34 | other: "{{ . }} 件の投稿" 35 | posts_tagged_with: "'{{ . }}'のタグが付いた記事全部" 36 | 37 | footer_build_with: > 38 | Hugo でビルドしています。 39 | 40 | footer_legal_notice: 法的な告知事項 41 | footer_privacy_policy: プライバシーポリシー 42 | footer_content_license_prefix: > 43 | 提供するコンテンツのライセンス 44 | 45 | language_switch_no_translation_prefix: "未翻訳のページ:" 46 | 47 | propertylist_required: 必須 48 | propertylist_optional: 任意 49 | propertylist_default: 既定値 50 | 51 | pagination_page_prev: 前 52 | pagination_page_next: 次 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /layouts/partials/menu.html: -------------------------------------------------------------------------------- 1 | 45 | -------------------------------------------------------------------------------- /layouts/posts/list.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 | {{ range .Paginator.Pages }} 4 | 32 | {{ end }} 33 |
34 | {{ partial "pagination.html" . }} 35 | {{ end }} 36 | 37 | {{ define "post-tag" }} 38 | 49 | {{ end }} 50 | -------------------------------------------------------------------------------- /layouts/_default/taxonomy.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 |
3 | {{ range .Paginator.Pages }} 4 | 34 | {{ end }} 35 |
36 | {{ partial "pagination.html" . }} 37 | {{ end }} 38 | 39 | {{ define "post-tag" }} 40 | 51 | {{ end }} 52 | -------------------------------------------------------------------------------- /layouts/partials/menu-extra.html: -------------------------------------------------------------------------------- 1 | {{ $current := .current }} 2 | {{ template "menu-extra" dict "sect" .source "current" $current "site" $current.Site "target" .target }} 3 | 4 | 5 | 6 | {{ define "menu-extra" }} 7 | {{ $current := .current }} 8 | {{ $site := .site }} 9 | {{ $target := .target }} 10 | {{ $sect := .sect }} 11 | 12 | {{ range sort (default (seq 0) $sect) "weight" }} 13 | {{ if isset . "ref" }} 14 | {{ $this := $site.GetPage .ref }} 15 | {{ $isCurrent := eq $current $this }} 16 | {{ $icon := default false .icon }} 17 | 18 | {{ $name := .name }} 19 | {{ if reflect.IsMap .name }} 20 | {{ $name = (index .name $site.Language.Lang) }} 21 | {{ end }} 22 | 23 | {{ if not .icon }} 24 | {{ errorf "Missing 'icon' attribute in data file for '%s' menu item '%s'" $target $name }} 25 | {{ end }} 26 | 27 | {{ if eq $target "header" }} 28 | 29 | 40 | 41 | {{ $name }} 42 | 43 | 44 | 45 | 46 | {{ end }} 47 | {{ end }} 48 | {{ end }} 49 | {{ end }} 50 | -------------------------------------------------------------------------------- /src/icons/xmpp.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | xmpp 4 | 5 | 6 | -------------------------------------------------------------------------------- /i18n/am.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: ገጹን ማስተካከያ 3 | 4 | nav_navigation: መሄጃ 5 | nav_tags: መለያዎች 6 | nav_more: ተጨማሪ 7 | nav_top: ወደ ላይ ተመለስ 8 | 9 | form_placeholder_search: ፈልግ 10 | 11 | error_page_title: ጠፋብዎት? አይጨነቁ። 12 | error_message_title: ጠፋብዎት? 13 | error_message_code: አልተገኘም 14 | error_message_text: > 15 | ገጹን ማግኘት አልተቻለም፤ ነገር ግን አይጨነቁ፤ በዚህ ገጽ መመለስ ይችላሉ። 16 | 17 | button_toggle_dark: ብሩህ/ጨለማ መቀያየሪያ 18 | button_nav_open: መሄጃውን ክፈት 19 | button_nav_close: መሄጃውን ዝጋ 20 | button_menu_open: ምርጫዎችን ክፈት 21 | button_menu_close: ምርጫዎችን ዝጋ 22 | button_homepage: ወደ መጀመሪያ ገጽ ተመለስ 23 | 24 | title_anchor_prefix: "ማያያዣ ወደ:" 25 | 26 | posts_read_more: ሙሉውን ያንብቡ 27 | posts_read_time: 28 | one: "ለማንበብ አንድ ደቂቃ" 29 | other: "{{ . }} ደቂቃዎች ለማንበብ" 30 | posts_update_prefix: መጨረሻ የዘመነው 31 | posts_count: 32 | one: "አንድ ጽሑፍ" 33 | other: "{{ . }} ጽሑፎች" 34 | posts_tagged_with: ከ '{{ . }}' ጋር የተዛመዱ ጽሑፎች በሙሉ 35 | 36 | footer_build_with: > 37 | በ Hugo የተገነባ ከ 38 | ጋር 39 | footer_legal_notice: ሕጋዊ መረጃዎች 40 | footer_privacy_policy: ስለ መረጃዎ አያያዝ ያለን አቋም 41 | footer_content_license_prefix: > 42 | ስለ ይዘቱ ባለመብትነት መረጃ 43 | 44 | language_switch_no_translation_prefix: "ያልተተረጐመ ገጽ:" 45 | 46 | propertylist_required: ግድ የሚያስፈልግ 47 | propertylist_optional: ግድ ያልሆነ 48 | propertylist_default: በባዶ ፈንታ 49 | 50 | pagination_page_prev: ያለፈው 51 | pagination_page_next: ቀጣይ 52 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 53 | -------------------------------------------------------------------------------- /i18n/en.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: Edit page 3 | 4 | nav_navigation: Navigation 5 | nav_tags: Tags 6 | nav_more: More 7 | nav_top: Back to top 8 | 9 | form_placeholder_search: Search 10 | 11 | error_page_title: Lost? Don't worry 12 | error_message_title: Lost? 13 | error_message_code: Error 404 14 | error_message_text: > 15 | Seems like what you are looking for can't be found. Don't worry, we can 16 | bring you back to the homepage. 17 | 18 | button_toggle_dark: Toggle Dark/Light/Auto mode 19 | button_nav_open: Open Navigation 20 | button_nav_close: Close Navigation 21 | button_menu_open: Open Menu Bar 22 | button_menu_close: Close Menu Bar 23 | button_homepage: Back to homepage 24 | 25 | title_anchor_prefix: "Anchor to:" 26 | 27 | posts_read_more: Read full post 28 | posts_read_time: 29 | one: "One minute to read" 30 | other: "{{ . }} minutes to read" 31 | posts_update_prefix: Updated on 32 | posts_count: 33 | one: "One post" 34 | other: "{{ . }} posts" 35 | posts_tagged_with: All posts tagged with '{{ . }}' 36 | 37 | footer_build_with: > 38 | Built with Hugo and 39 | 40 | footer_legal_notice: Legal Notice 41 | footer_privacy_policy: Privacy Policy 42 | footer_content_license_prefix: > 43 | Content licensed under 44 | 45 | language_switch_no_translation_prefix: "Page not translated:" 46 | 47 | propertylist_required: required 48 | propertylist_optional: optional 49 | propertylist_default: default 50 | 51 | pagination_page_prev: prev 52 | pagination_page_next: next 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /layouts/partials/posts/metadata.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{ $tc := 0 }} 19 | {{ with .Params.tags }} 20 | {{ range sort . }} 21 | {{ $name := . }} 22 | {{ with $.Site.GetPage (printf "/tags/%s" $name | urlize) }} 23 | {{ if eq $tc 0 }} 24 | 25 | 26 | {{ template "post-tag" dict "name" $name "page" . }} 27 | 28 | {{ else }} 29 | 30 | {{ template "post-tag" dict "name" $name "page" . }} 31 | 32 | {{ end }} 33 | {{ end }} 34 | {{ $tc = (add $tc 1) }} 35 | {{ end }} 36 | {{ end }} 37 | 38 | {{ define "post-tag" }} 39 | 48 | {{ end }} 49 | -------------------------------------------------------------------------------- /i18n/da.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: Rediger side 3 | 4 | nav_navigation: Navigation 5 | nav_tags: Tags 6 | nav_more: Mere 7 | nav_top: Til toppen 8 | 9 | form_placeholder_search: Søg 10 | 11 | error_page_title: Faret vild? Bare rolig 12 | error_message_title: Lost? 13 | error_message_code: Fejl 404 14 | error_message_text: > 15 | Det du leder efter kan ikke findes. Bare rolig, du kan komme tilbage til 16 | forsiden. 17 | 18 | button_toggle_dark: Skift Dark/Light/Auto mode 19 | button_nav_open: Åben navigation 20 | button_nav_close: Luk navigation 21 | button_menu_open: Åben menubar 22 | button_menu_close: Luk menubar 23 | button_homepage: Tilbage til forsiden 24 | 25 | title_anchor_prefix: "Link til:" 26 | 27 | posts_read_more: Læs fulde indlæg 28 | posts_read_time: 29 | one: "Et minut at gennemlæse" 30 | other: "{{ . }} minutter at gennemlæse" 31 | posts_update_prefix: Opdateret den 32 | posts_count: 33 | one: "Et indlæg" 34 | other: "{{ . }} indlæg" 35 | posts_tagged_with: Alle indslag tagget med '{{ . }}' 36 | 37 | footer_build_with: > 38 | Bygget med Hugo og 39 | 40 | footer_legal_notice: Forretningsbetingelser 41 | footer_privacy_policy: Privatlivspolitik 42 | footer_content_license_prefix: > 43 | Indhold licenseret under 44 | 45 | language_switch_no_translation_prefix: "Indlæg ikke oversat:" 46 | 47 | propertylist_required: påkrævet 48 | propertylist_optional: valgfri 49 | propertylist_default: udgangspunkt 50 | 51 | pagination_page_prev: forrige 52 | pagination_page_next: næste 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /.github/settings.yaml: -------------------------------------------------------------------------------- 1 | repository: 2 | name: hugo-geekdoc 3 | description: Hugo theme made for documentation 4 | homepage: https://geekdocs.de 5 | topics: hugo, theme, hugo-theme, documentation 6 | 7 | private: false 8 | has_issues: true 9 | has_projects: false 10 | has_wiki: false 11 | has_downloads: true 12 | 13 | default_branch: main 14 | 15 | allow_squash_merge: true 16 | allow_merge_commit: true 17 | allow_rebase_merge: true 18 | 19 | labels: 20 | - name: bug 21 | color: d73a4a 22 | description: Something isn't working 23 | - name: documentation 24 | color: 0075ca 25 | description: Improvements or additions to documentation 26 | - name: duplicate 27 | color: cfd3d7 28 | description: This issue or pull request already exists 29 | - name: enhancement 30 | color: a2eeef 31 | description: New feature or request 32 | - name: good first issue 33 | color: 7057ff 34 | description: Good for newcomers 35 | - name: help wanted 36 | color: 008672 37 | description: Extra attention is needed 38 | - name: invalid 39 | color: e4e669 40 | description: This doesn't seem right 41 | - name: question 42 | color: d876e3 43 | description: Further information is requested 44 | - name: wontfix 45 | color: ffffff 46 | description: This will not be worked on 47 | 48 | branches: 49 | - name: main 50 | protection: 51 | required_pull_request_reviews: null 52 | required_status_checks: 53 | strict: false 54 | contexts: 55 | - ci/woodpecker/pr/static 56 | - ci/woodpecker/pr/build-package 57 | - ci/woodpecker/pr/docs 58 | enforce_admins: false 59 | required_linear_history: true 60 | restrictions: null 61 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | ## Security 4 | 5 | If you think you have found a **security issue**, please do not mention it in this repository. 6 | Instead, send an email to `security@thegeeklab.de` with as many details as possible so it can be handled confidential. 7 | 8 | ## Bug Reports and Feature Requests 9 | 10 | If you have found a **bug** or have a **feature request** please use the search first to see if a similar issue already exists. 11 | If not, please create an issue in this repository 12 | 13 | ## Code 14 | 15 | If you would like to fix a bug or implement a feature, please fork the repository and create a Pull Request. 16 | 17 | Before you start any Pull Request, it is recommended that you create an issue to discuss first if you have any 18 | doubts about requirement or implementation. That way you can be sure that the maintainer(s) agree on what to change and how, 19 | and you can hopefully get a quick merge afterwards. 20 | 21 | Pull Requests can only be merged once all status checks are green. 22 | 23 | ## Do not force push to your Pull Request branch 24 | 25 | Please do not force push to your Pull Requests branch after you have created your Pull Request, as doing so makes it harder for us to review your work. 26 | Pull Requests will always be squashed by us when we merge your work. Commit as many times as you need in your Pull Request branch. 27 | 28 | ## Re-requesting a review 29 | 30 | Please do not ping your reviewer(s) by mentioning them in a new comment. Instead, use the re-request review functionality. 31 | Read more about this in the [GitHub docs, Re-requesting a review](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/incorporating-feedback-in-your-pull-request#re-requesting-a-review). 32 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/tabs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tabs 3 | --- 4 | 5 | Tabs let you organize content by context, for example installation instructions for each supported platform. 6 | 7 | ## Usage 8 | 9 | 10 | ```tpl 11 | {{}} 12 | {{}} # macOS Content {{}} 13 | {{}} # Linux Content {{}} 14 | {{}} # Windows Content {{}} 15 | {{}} 16 | ``` 17 | 18 | 19 | ## Example 20 | 21 | {{< tabs "uniqueid" >}} 22 | {{< tab "macOS" >}} 23 | 24 | ## macOS 25 | 26 | This is tab **macOS** content. 27 | 28 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates 29 | investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad 30 | prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim 31 | fastidious copious quo ad. Stet probates in duo. 32 | {{< /tab >}} 33 | 34 | {{< tab "Linux" >}} 35 | 36 | ## Linux 37 | 38 | This is tab **Linux** content. 39 | 40 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates 41 | investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad 42 | prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim 43 | fastidious copious quo ad. Stet probates in duo. 44 | {{< /tab >}} 45 | 46 | {{< tab "Windows" >}} 47 | 48 | ## Windows 49 | 50 | This is tab **Windows** content. 51 | 52 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates 53 | investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad 54 | prompts feud gait, quid exercise emeritus bis e. In pro quints consequent. 55 | {{< /tab >}} 56 | {{< /tabs >}} 57 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/columns.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Columns 3 | --- 4 | 5 | The Columns shortcode can be used to organize content side-by-side (horizontally) for better readability. 6 | 7 | ## Usage 8 | 9 | ```html 10 | {{}} 11 | ## Left Content 12 | Dolor sit, sumo unique argument um no ... 13 | 14 | <---> 15 | 16 | ## Mid Content 17 | Dolor sit, sumo unique argument um no ... 18 | 19 | <---> 20 | 21 | ## Right Content 22 | Dolor sit, sumo unique argument um no ... 23 | {{}} 24 | ``` 25 | 26 | ### Attributes 27 | 28 | 29 | 30 | {{< propertylist name=shortcode-columns sort=name order=asc >}} 31 | 32 | 33 | 34 | ## Example 35 | 36 | {{< columns >}} 37 | 38 | ### Left 39 | 40 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates 41 | investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts 42 | feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious 43 | copious quo ad. Stet probates in duo. 44 | 45 | <---> 46 | 47 | ### Mid Content 48 | 49 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates 50 | investiture. Ornateness bland it ex enc, est yeti am bongo detract re. 51 | 52 | <---> 53 | 54 | ### Right Content 55 | 56 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates 57 | investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts 58 | feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious 59 | copious quo ad. Stet probates in duo. 60 | {{< /columns >}} 61 | -------------------------------------------------------------------------------- /i18n/nl.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: Wijzig pagina 3 | 4 | nav_navigation: Navigatie 5 | nav_tags: Markering 6 | nav_more: Meer 7 | nav_top: Terug naar boven 8 | 9 | form_placeholder_search: Zoek 10 | 11 | error_page_title: Verdwaald? Geen probleem 12 | error_message_title: Verdwaald? 13 | error_message_code: Error 404 14 | error_message_text: > 15 | Het lijkt er op dat wat je zoekt niet gevonden kan worden. Geen probleem, 16 | we kunnen je terug naar de startpagina brengen. 17 | 18 | button_toggle_dark: Wijzig Donker/Licht/Auto weergave 19 | button_nav_open: Open navigatie 20 | button_nav_close: Sluit navigatie 21 | button_menu_open: Open menubalk 22 | button_menu_close: Sluit menubalk 23 | button_homepage: Terug naar startpagina 24 | 25 | title_anchor_prefix: "Link naar:" 26 | 27 | posts_read_more: Lees volledige bericht 28 | posts_read_time: 29 | one: "Een minuut leestijd" 30 | other: "{{ . }} minuten leestijd" 31 | posts_update_prefix: Bijgewerkt op 32 | posts_count: 33 | one: "Een bericht" 34 | other: "{{ . }} berichten" 35 | posts_tagged_with: Alle berichten gemarkeerd met '{{ . }}' 36 | 37 | footer_build_with: > 38 | Gebouwd met Hugo en 39 | 40 | footer_legal_notice: Juridische mededeling 41 | footer_privacy_policy: Privacybeleid 42 | footer_content_license_prefix: > 43 | Inhoud gelicenseerd onder 44 | 45 | language_switch_no_translation_prefix: "Pagina niet vertaald:" 46 | 47 | propertylist_required: verplicht 48 | propertylist_optional: optioneel 49 | propertylist_default: standaard 50 | 51 | pagination_page_prev: vorige 52 | pagination_page_next: volgende 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /i18n/de.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: Seite bearbeiten 3 | 4 | nav_navigation: Navigation 5 | nav_tags: Tags 6 | nav_more: Weitere 7 | nav_top: Nach oben 8 | 9 | form_placeholder_search: Suchen 10 | 11 | error_page_title: Verlaufen? Keine Sorge 12 | error_message_title: Verlaufen? 13 | error_message_code: Fehler 404 14 | error_message_text: > 15 | Wir können die Seite nach der Du gesucht hast leider nicht finden. Keine Sorge, 16 | wir bringen Dich zurück zur Startseite. 17 | 18 | button_toggle_dark: Wechsel zwischen Dunkel/Hell/Auto Modus 19 | button_nav_open: Navigation öffnen 20 | button_nav_close: Navigation schließen 21 | button_menu_open: Menüband öffnen 22 | button_menu_close: Menüband schließen 23 | button_homepage: Zurück zur Startseite 24 | 25 | title_anchor_prefix: "Link zu:" 26 | 27 | posts_read_more: Ganzen Artikel lesen 28 | posts_read_time: 29 | one: "Eine Minute Lesedauer" 30 | other: "{{ . }} Minuten Lesedauer" 31 | posts_update_prefix: Aktualisiert am 32 | posts_count: 33 | one: "Ein Artikel" 34 | other: "{{ . }} Artikel" 35 | posts_tagged_with: Alle Artikel mit dem Tag '{{ . }}' 36 | 37 | footer_build_with: > 38 | Entwickelt mit Hugo und 39 | 40 | footer_legal_notice: Impressum 41 | footer_privacy_policy: Datenschutzerklärung 42 | footer_content_license_prefix: > 43 | Inhalt lizensiert unter 44 | 45 | language_switch_no_translation_prefix: "Seite nicht übersetzt:" 46 | 47 | propertylist_required: erforderlich 48 | propertylist_optional: optional 49 | propertylist_default: Standardwert 50 | 51 | pagination_page_prev: vorher 52 | pagination_page_next: weiter 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /i18n/cs.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: Upravit stránku 3 | 4 | nav_navigation: Navigace 5 | nav_tags: Tagy 6 | nav_more: Více 7 | nav_top: Zpět nahoru 8 | 9 | form_placeholder_search: Vyhledat 10 | 11 | error_page_title: Ztracen? Nic se neděje 12 | error_message_title: Ztracen? 13 | error_message_code: Error 404 14 | error_message_text: > 15 | Vypadá to že stránka, kterou hledáte, neexistuje. Nemějte obavy, můžete 16 | se vrátit zpět na domovskou stránku. 17 | 18 | button_toggle_dark: Přepnout tmavý/světlý/automatický režim 19 | button_nav_open: Otevřít navigaci 20 | button_nav_close: Zavřít navigaci 21 | button_menu_open: Otevřít lištu nabídky 22 | button_menu_close: Zavřít lištu nabídky 23 | button_homepage: Zpět na domovskou stránku 24 | 25 | title_anchor_prefix: "Odkaz na:" 26 | 27 | posts_read_more: Přečíst celý příspěvek 28 | posts_read_time: 29 | one: "Doba čtení: 1 minuta" 30 | other: "Doba čtení: {{ . }} minut(y)" 31 | posts_update_prefix: Naposledy upraveno 32 | posts_count: 33 | one: "Jeden příspěvek" 34 | other: "Příspěvků: {{ . }}" 35 | posts_tagged_with: Všechny příspěvky označeny '{{ . }}' 36 | 37 | footer_build_with: > 38 | Vytvořeno za pomocí Hugo a 39 | 40 | footer_legal_notice: Právní upozornění 41 | footer_privacy_policy: Zásady ochrany soukromí 42 | footer_content_license_prefix: > 43 | Obsah licencovaný pod 44 | 45 | language_switch_no_translation_prefix: "Stránka není přeložena:" 46 | 47 | propertylist_required: povinné 48 | propertylist_optional: volitené 49 | propertylist_default: výchozí 50 | 51 | pagination_page_prev: předchozí 52 | pagination_page_next: další 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /i18n/es.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: Editar página 3 | 4 | nav_navigation: Navegación 5 | nav_tags: Etiquetas 6 | nav_more: Más 7 | nav_top: Inicio de la página 8 | 9 | form_placeholder_search: Buscar 10 | 11 | error_page_title: Perdido? No te preocupes 12 | error_message_title: Perdido? 13 | error_message_code: Error 404 14 | error_message_text: > 15 | Al parecer, lo que estás buscando no pudo ser encontrado. No te preocupes, podemos 16 | llevarte de vuelta al inicio. 17 | 18 | button_toggle_dark: Cambiar el modo Oscuro/Claro/Auto 19 | button_nav_open: Abrir la Navegación 20 | button_nav_close: Cerrar la Navegación 21 | button_menu_open: Abrir el Menú Bar 22 | button_menu_close: Cerrar el Menú Bar 23 | button_homepage: Volver al Inicio 24 | 25 | title_anchor_prefix: "Anclado a:" 26 | 27 | posts_read_more: Lee la publicación completa 28 | posts_read_time: 29 | one: "Un minuto para leer" 30 | other: "{{ . }} minutos para leer" 31 | posts_update_prefix: Actualizado en 32 | posts_count: 33 | one: "Una publicación" 34 | other: "{{ . }} publicaciones" 35 | posts_tagged_with: Todas las publicaciones etiquetadas con '{{ . }}' 36 | 37 | footer_build_with: > 38 | Creado con Hugo y 39 | 40 | footer_legal_notice: Aviso Legal 41 | footer_privacy_policy: Política de Privacidad 42 | footer_content_license_prefix: > 43 | Contenido licenciado con 44 | 45 | language_switch_no_translation_prefix: "Página no traducida:" 46 | 47 | propertylist_required: requerido 48 | propertylist_optional: opcional 49 | propertylist_default: estándar 50 | 51 | pagination_page_prev: previo 52 | pagination_page_next: siguiente 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /src/sass/_utils.scss: -------------------------------------------------------------------------------- 1 | @use "defaults"; 2 | 3 | .flex { 4 | display: flex; 5 | } 6 | 7 | .flex-auto { 8 | flex: 1 1 auto; 9 | } 10 | 11 | .flex-25 { 12 | flex: 1 1 25%; 13 | } 14 | 15 | .flex-inline { 16 | display: inline-flex; 17 | } 18 | 19 | .flex-even { 20 | flex: 1 1; 21 | } 22 | 23 | .flex-wrap { 24 | flex-wrap: wrap; 25 | } 26 | 27 | .flex-grid { 28 | flex-direction: column; 29 | border: defaults.$border-1 solid var(--accent-color); 30 | border-radius: defaults.$border-radius; 31 | background: var(--accent-color-lite); 32 | } 33 | 34 | .gap-8 { 35 | flex-wrap: wrap; 36 | gap: defaults.$padding-8; 37 | } 38 | 39 | .gap-16 { 40 | flex-wrap: wrap; 41 | gap: defaults.$padding-16; 42 | } 43 | 44 | .justify-start { 45 | justify-content: flex-start; 46 | } 47 | 48 | .justify-end { 49 | justify-content: flex-end; 50 | } 51 | 52 | .justify-center { 53 | justify-content: center; 54 | } 55 | 56 | .justify-between { 57 | justify-content: space-between; 58 | } 59 | 60 | .align-center { 61 | align-items: center; 62 | } 63 | 64 | .mx-auto { 65 | margin: 0 auto; 66 | } 67 | 68 | .text-center { 69 | text-align: center; 70 | } 71 | 72 | .text-right { 73 | text-align: right; 74 | } 75 | 76 | .no-wrap { 77 | white-space: nowrap; 78 | } 79 | 80 | .hidden { 81 | display: none !important; 82 | } 83 | 84 | .svg-sprite { 85 | position: absolute; 86 | width: 0; 87 | height: 0; 88 | overflow: hidden; 89 | } 90 | 91 | .table-wrap { 92 | overflow: auto; 93 | margin: defaults.$padding-16 0; 94 | 95 | > table { 96 | margin: 0 !important; 97 | } 98 | } 99 | 100 | .badge-placeholder { 101 | display: inline-block; 102 | min-width: 4rem; 103 | } 104 | 105 | .w-full { 106 | width: 100%; 107 | } 108 | -------------------------------------------------------------------------------- /i18n/fr.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: Editer la page 3 | 4 | nav_navigation: Navigation 5 | nav_tags: Tags 6 | nav_more: Plus 7 | nav_top: Retour au haut de page 8 | 9 | form_placeholder_search: Chercher 10 | 11 | error_page_title: Perdu? Ne t'inquiète pas 12 | error_message_title: Perdu? 13 | error_message_code: Error 404 14 | error_message_text: > 15 | On dirait que ce que vous cherchez est introuvable. Ne vous inquiétez pas, nous pouvons 16 | vous ramèner à la page d'accueil. 17 | 18 | button_toggle_dark: Basculer le mode Sombre/Clair/Auto 19 | button_nav_open: Ouvrir la navigation 20 | button_nav_close: Fermer la navigation 21 | button_menu_open: Ouvrir la barre de menus 22 | button_menu_close: Fermer la barre de menus 23 | button_homepage: retour à la page d'accueil 24 | 25 | title_anchor_prefix: "Ancrer à :" 26 | 27 | posts_read_more: Lire l'article complet 28 | posts_read_time: 29 | one: "Une minute pour lire" 30 | other: "{{ . }} minutes à lire" 31 | posts_update_prefix: Mis à jour le 32 | posts_count: 33 | one: "Un billet" 34 | other: "{{ . }} billets" 35 | posts_tagged_with: Tous les articles marqués avec '{{ . }}' 36 | 37 | footer_build_with: > 38 | Construit avec Hugo et 39 | 40 | footer_legal_notice: Mentions légales 41 | footer_privacy_policy: Politique de confidentialité 42 | footer_content_license_prefix: > 43 | Contenu sous licence 44 | 45 | language_switch_no_translation_prefix: "Page non traduite:" 46 | 47 | propertylist_required: requis 48 | propertylist_optional: facultatif 49 | propertylist_default: défaut 50 | 51 | pagination_page_prev: précédent 52 | pagination_page_next: suivant 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /i18n/oc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: Modificar la pagina 3 | 4 | nav_navigation: Navegacion 5 | nav_tags: Etiquetas 6 | nav_more: Mai 7 | nav_top: Tornar ennaut 8 | 9 | form_placeholder_search: Cercar 10 | 11 | error_page_title: Perdut ? Cap de problèma 12 | error_message_title: Perdut ? 13 | error_message_code: Error 404 14 | error_message_text: > 15 | Sembla que cercatz quicòm que se pòt pas trobat. Vos’n fagatz pas vos podèm 16 | tornar a la pagina d’acuèlh. 17 | 18 | button_toggle_dark: Alternar lo mòde escur/clar/auto 19 | button_nav_open: Dobrir la navegacion 20 | button_nav_close: Tampar la navegacion 21 | button_menu_open: Dobrir la barra de menú 22 | button_menu_close: Tampar la barra de menú 23 | button_homepage: Tornar a la pagina d’acuèlh 24 | 25 | title_anchor_prefix: "Ancorar a:" 26 | 27 | posts_read_more: Legir la publicacion complèta 28 | posts_read_time: 29 | one: "Una minuta de lectura" 30 | other: "{{ . }} minutas de lectura" 31 | posts_update_prefix: Actualizada lo 32 | posts_count: 33 | one: "Una publicacion" 34 | other: "{{ . }} publicacions" 35 | posts_tagged_with: Totas las publicacions amb '{{ . }}' 36 | 37 | footer_build_with: > 38 | Construch amb Hugo e 39 | 40 | footer_legal_notice: Mencions legalas 41 | footer_privacy_policy: politica de confidencialitat 42 | footer_content_license_prefix: > 43 | Contengut sota licéncia 44 | 45 | language_switch_no_translation_prefix: "Pagina non traducha :" 46 | 47 | propertylist_required: requerit 48 | propertylist_optional: opcional 49 | propertylist_default: per defaut 50 | 51 | pagination_page_prev: prec. 52 | pagination_page_next: seg. 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /i18n/it.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | edit_page: Modifica la pagina 3 | 4 | nav_navigation: Navigazione 5 | nav_tags: Etichette 6 | nav_more: Altro 7 | nav_top: Torna su 8 | 9 | form_placeholder_search: Cerca 10 | 11 | error_page_title: Perso? Non ti preoccupare 12 | error_message_title: Perso? 13 | error_message_code: Errore 404 14 | error_message_text: > 15 | Sembra che non sia possibile trovare quello che stavi cercando. Non ti preoccupare, 16 | possiamo riportarti alla pagina iniziale. 17 | 18 | button_toggle_dark: Seleziona il tema Chiaro/Scuro/Automatico 19 | button_nav_open: Apri la Navigazione 20 | button_nav_close: Chiudi la Navigazione 21 | button_menu_open: Apri la Barra del Menu 22 | button_menu_close: Chiudi la Barra del Menu 23 | button_homepage: Torna alla pagina iniziale 24 | 25 | title_anchor_prefix: "Ancora a:" 26 | 27 | posts_read_more: Leggi tutto il post 28 | posts_read_time: 29 | one: "Tempo di lettura: un minuto" 30 | other: "Tempo di lettura: {{ . }} minuti" 31 | posts_update_prefix: Aggiornato il 32 | posts_count: 33 | one: "Un post" 34 | other: "{{ . }} post" 35 | posts_tagged_with: Tutti i post etichettati con '{{ . }}' 36 | 37 | footer_build_with: > 38 | Realizzato con Hugo e 39 | 40 | footer_legal_notice: Avviso Legale 41 | footer_privacy_policy: Politica sulla Privacy 42 | footer_content_license_prefix: > 43 | Contenuto sotto licenza 44 | 45 | language_switch_no_translation_prefix: "Pagina non tradotta:" 46 | 47 | propertylist_required: richiesto 48 | propertylist_optional: opzionale 49 | propertylist_default: valore predefinito 50 | 51 | pagination_page_prev: precedente 52 | pagination_page_next: prossimo 53 | pagination_page_state: "{{ .PageNumber }}/{{ .TotalPages }}" 54 | -------------------------------------------------------------------------------- /layouts/partials/language.html: -------------------------------------------------------------------------------- 1 | {{ if hugo.IsMultilingual }} 2 | 3 |
    4 |
  • 5 | {{ range .Site.Languages }} 6 | {{ if eq . $.Site.Language }} 7 | 8 | 9 | {{ .Lang | upper }} 10 | 11 | {{ end }} 12 | {{ end }} 13 | 14 | 15 | 48 |
  • 49 |
50 |
51 | {{ end }} 52 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/mermaid.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mermaid 3 | --- 4 | 5 | [Mermaid](https://mermaidjs.github.io/) is library for generating SVG charts and diagrams from text. 6 | 7 | ## Usage 8 | 9 | 10 | ```tpl 11 | {{}} 12 | sequenceDiagram 13 | Alice->>Bob: Hello Bob, how are you? 14 | alt is sick 15 | Bob->>Alice: Not so good :( 16 | else is well 17 | Bob->>Alice: Feeling fresh like a daisy 18 | end 19 | opt Extra response 20 | Bob->>Alice: Thanks for asking 21 | end 22 | {{}} 23 | ``` 24 | 25 | ### Attributes 26 | 27 | 28 | 29 | {{< propertylist name=shortcode-mermaid sort=name order=asc >}} 30 | 31 | 32 | 33 | ## Example 34 | 35 | 36 | 37 | {{< mermaid class="text-center" >}} 38 | sequenceDiagram 39 | Alice->>Bob: Hello Bob, how are you? 40 | alt is sick 41 | Bob->>Alice: Not so good :( 42 | else is well 43 | Bob->>Alice: Feeling fresh like a daisy 44 | end 45 | opt Extra response 46 | Bob->>Alice: Thanks for asking 47 | end 48 | {{< /mermaid >}} 49 | 50 | 51 | 52 | As an alternative to shortcodes, code blocks can be used for markdown as well. 53 | 54 | {{< columns >}} 55 | 56 | 57 | ````tpl 58 | ```mermaid 59 | flowchart LR 60 | A[Hard] -->|Text| B(Round) 61 | B --> C{Decision} 62 | C -->|One| D[Result 1] 63 | C -->|Two| E[Result 2] 64 | ``` 65 | ```` 66 | 67 | <---> 68 | 69 | 70 | 71 | ```mermaid 72 | flowchart LR 73 | A[Hard] -->|Text| B(Round) 74 | B --> C{Decision} 75 | C -->|One| D[Result 1] 76 | C -->|Two| E[Result 2] 77 | ``` 78 | 79 | 80 | 81 | {{< /columns >}} 82 | -------------------------------------------------------------------------------- /layouts/partials/site-footer.html: -------------------------------------------------------------------------------- 1 | 46 | -------------------------------------------------------------------------------- /src/js/colorTheme.js: -------------------------------------------------------------------------------- 1 | import Storage from "store2" 2 | import { TOGGLE_COLOR_THEMES, THEME, COLOR_THEME_AUTO } from "./config.js" 3 | ;(() => { 4 | applyTheme() 5 | })() 6 | 7 | document.addEventListener("DOMContentLoaded", () => { 8 | const colorThemeToggle = document.getElementById("gdoc-color-theme") 9 | 10 | function toggleColorTheme() { 11 | let lstore = Storage.namespace(THEME) 12 | let currentColorTheme = lstore.get("color-theme") || COLOR_THEME_AUTO 13 | let nextColorTheme = toggle(TOGGLE_COLOR_THEMES, currentColorTheme) 14 | 15 | lstore.set("color-theme", TOGGLE_COLOR_THEMES[nextColorTheme]) 16 | applyTheme(false) 17 | } 18 | 19 | colorThemeToggle.onclick = function () { 20 | toggleColorTheme() 21 | } 22 | 23 | colorThemeToggle.addEventListener("keydown", function (event) { 24 | if (event.key === "Enter") { 25 | toggleColorTheme() 26 | event.preventDefault() 27 | } 28 | }) 29 | }) 30 | 31 | function applyTheme(init = true) { 32 | if (Storage.isFake()) return 33 | 34 | let lstore = Storage.namespace(THEME) 35 | let html = document.documentElement 36 | let currentColorTheme = TOGGLE_COLOR_THEMES.includes(lstore.get("color-theme")) 37 | ? lstore.get("color-theme") 38 | : COLOR_THEME_AUTO 39 | 40 | html.setAttribute("class", "color-toggle-" + currentColorTheme) 41 | 42 | if (currentColorTheme === COLOR_THEME_AUTO) { 43 | html.removeAttribute("color-theme") 44 | } else { 45 | html.setAttribute("color-theme", currentColorTheme) 46 | } 47 | 48 | if (!init) { 49 | // Reload required to re-initialize e.g. Mermaid with the new theme 50 | // and re-parse the Mermaid code blocks. 51 | location.reload() 52 | } 53 | } 54 | 55 | function toggle(list = [], value) { 56 | let current = list.indexOf(value) 57 | let max = list.length - 1 58 | let next = 0 59 | 60 | if (current < max) { 61 | next = current + 1 62 | } 63 | 64 | return next 65 | } 66 | -------------------------------------------------------------------------------- /src/icons/github.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | github 4 | 5 | 6 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/toc.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ToC 3 | --- 4 | 5 | Simple wrapper to generate a page Table of Content from a shortcode. 6 | 7 | ## Usage 8 | 9 | 10 | ```tpl 11 | {{}} 12 | ``` 13 | 14 | ### Attributes 15 | 16 | 17 | 18 | {{< propertylist name=shortcode-toc sort=name order=asc >}} 19 | 20 | 21 | 22 | ## Example 23 | 24 | {{< toc >}} 25 | 26 | ## Level 1 27 | 28 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. In pro quints consequent, denim fastidious copious quo ad. Stet probates in duo. 29 | 30 | ## Level 2 31 | 32 | Amalia id per in minimum facility, quid facet modifier ea ma. Ill um select ma ad, en ferric patine sentient vim. Per expendable foreordained interpretations cu, maxim sole pertinacity in ram. 33 | 34 | ### Level 2.1 35 | 36 | Amalia id per in minimum facility, quid facet modifier ea ma. Ill um select ma ad, en ferric patine sentient vim. Per expendable foreordained interpretations cu, maxim sole pertinacity in ram. 37 | 38 | #### Level 2.1.1 39 | 40 | Amalia id per in minimum facility, quid facet modifier ea ma. Ill um select ma ad, en ferric patine sentient vim. 41 | 42 | ##### Level 2.1.1.1 43 | 44 | In pro quints consequent, denim fastidious copious quo ad. 45 | 46 | ###### Level 2.1.1.1.1 47 | 48 | In pro quints consequent, denim fastidious copious quo ad. 49 | 50 | ### Level 2.2 51 | 52 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. Ornateness bland it ex enc, est yeti am bongo detract re. Pro ad prompts feud gait, quid exercise emeritus bis e. 53 | 54 | Amalia id per in minimum facility, quid facet modifier ea ma. Ill um select ma ad, en ferric patine sentient vim. Per expendable foreordained interpretations cu, maxim sole pertinacity in ram. 55 | -------------------------------------------------------------------------------- /.woodpecker/docs.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | when: 3 | - event: [pull_request, tag] 4 | - event: [push, manual] 5 | branch: 6 | - ${CI_REPO_DEFAULT_BRANCH} 7 | 8 | steps: 9 | - name: assets 10 | image: docker.io/library/node:lts 11 | commands: 12 | - npm install --quiet --no-progress 13 | - npm run svg-sprite-list 14 | - mkdir -p exampleSite/themes/${CI_REPO_NAME} 15 | - curl -sSL https://github.com/${CI_REPO}/releases/latest/download/${CI_REPO_NAME}.tar.gz | tar -xz -C exampleSite/themes/${CI_REPO_NAME}/ --strip-components=1 16 | when: 17 | - event: [tag] 18 | - event: [push, manual] 19 | branch: 20 | - ${CI_REPO_DEFAULT_BRANCH} 21 | 22 | - name: assets-main 23 | image: docker.io/library/node:lts 24 | commands: 25 | - npm install --quiet --no-progress 26 | - npm run build 27 | - npm run svg-sprite-list 28 | - mkdir -p exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/${CI_REPO_NAME} 29 | environment: 30 | FORCE_COLOR: "true" 31 | when: 32 | - event: [pull_request] 33 | 34 | - name: build 35 | image: quay.io/thegeeklab/hugo:0.152 36 | commands: 37 | - hugo --panicOnWarning -s exampleSite/ 38 | 39 | - name: beautify 40 | image: quay.io/thegeeklab/alpine-tools 41 | commands: 42 | - html-beautify -r -f 'exampleSite/public/**/*.html' 43 | environment: 44 | FORCE_COLOR: "true" 45 | 46 | - name: publish 47 | image: quay.io/thegeeklab/wp-s3-action 48 | settings: 49 | access_key: 50 | from_secret: s3_access_key 51 | bucket: geekdocs-root 52 | delete: true 53 | endpoint: 54 | from_secret: s3_endpoint 55 | path_style: true 56 | secret_key: 57 | from_secret: s3_secret_access_key 58 | source: exampleSite/public/ 59 | strip_prefix: exampleSite/public/ 60 | when: 61 | - event: [tag] 62 | - event: [push, manual] 63 | branch: 64 | - ${CI_REPO_DEFAULT_BRANCH} 65 | status: [success, failure] 66 | 67 | depends_on: 68 | - build-package 69 | -------------------------------------------------------------------------------- /layouts/partials/head/others.html: -------------------------------------------------------------------------------- 1 | {{- if default true .Site.Params.geekdocDarkModeToggle }} 2 | 3 | {{- end }} 4 | 5 | 6 | 13 | 20 | 21 | 26 | 31 | 32 | 37 | 42 | 43 | 48 | 53 | 54 | 59 | 64 | 65 | {{- with .OutputFormats.Get "html" }} 66 | {{ printf `` .Permalink .Rel .MediaType.Type | safeHTML }} 67 | {{- end }} 68 | 69 | {{- if (default false $.Site.Params.geekdocOverwriteHTMLBase) }} 70 | 71 | {{- end }} 72 | 73 | {{ printf "" "Made with Geekdoc theme https://github.com/thegeeklab/hugo-geekdoc" | safeHTML }} 74 | -------------------------------------------------------------------------------- /.woodpecker/static.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | when: 3 | - event: [pull_request, tag] 4 | - event: [push, manual] 5 | branch: 6 | - ${CI_REPO_DEFAULT_BRANCH} 7 | 8 | steps: 9 | - name: eslint 10 | image: docker.io/library/node:lts 11 | depends_on: [] 12 | commands: 13 | - npm install --quiet --no-progress 14 | - npm run lint:js 15 | environment: 16 | FORCE_COLOR: "true" 17 | 18 | - name: markdownlint 19 | image: quay.io/thegeeklab/markdownlint-cli 20 | depends_on: [] 21 | commands: 22 | - markdownlint 'exampleSite/content/**/*.md' 'README.md' 'CONTRIBUTING.md' 23 | 24 | - name: spellcheck 25 | image: ghcr.io/streetsidesoftware/cspell 26 | depends_on: [] 27 | commands: 28 | - cspell-cli lint . --gitignore --color 29 | 30 | - name: assets 31 | image: docker.io/library/node:lts 32 | depends_on: [] 33 | commands: 34 | - npm install --quiet --no-progress 35 | - npm run build 36 | environment: 37 | FORCE_COLOR: "true" 38 | 39 | - name: testbuild 40 | image: quay.io/thegeeklab/hugo:0.152 41 | depends_on: [assets] 42 | commands: 43 | - mkdir -p exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/${CI_REPO_NAME} 44 | - hugo --panicOnWarning -s exampleSite/ 45 | 46 | - name: link-validation 47 | image: docker.io/lycheeverse/lychee 48 | depends_on: [testbuild] 49 | commands: 50 | - lychee --no-progress --format detailed README.md 51 | - lychee --no-progress --format detailed --root-dir "$(pwd)/exampleSite/public" "exampleSite/public/**/*.html" 52 | environment: 53 | GITHUB_TOKEN: 54 | from_secret: github_token_ro 55 | 56 | - name: html-validation 57 | image: docker.io/library/node:lts 58 | depends_on: [testbuild] 59 | commands: 60 | - npm install --quiet --no-progress 61 | - npm run lint:html 62 | environment: 63 | FORCE_COLOR: "true" 64 | 65 | - name: page-validation 66 | image: quay.io/thegeeklab/lhci:0.15 67 | depends_on: [testbuild] 68 | commands: 69 | - lhci autorun 70 | environment: 71 | LHCI_SERVER_URL: https://ci-artifact.rknet.org/${CI_REPO_NAME}/ 72 | -------------------------------------------------------------------------------- /src/sass/_fonts.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: "Liberation Sans"; 3 | src: 4 | url("fonts/LiberationSans-Bold.woff2") format("woff2"), 5 | url("fonts/LiberationSans-Bold.woff") format("woff"); 6 | font-weight: bold; 7 | font-style: normal; 8 | font-display: swap; 9 | } 10 | 11 | @font-face { 12 | font-family: "Liberation Sans"; 13 | src: 14 | url("fonts/LiberationSans-BoldItalic.woff2") format("woff2"), 15 | url("fonts/LiberationSans-BoldItalic.woff") format("woff"); 16 | font-weight: bold; 17 | font-style: italic; 18 | font-display: swap; 19 | } 20 | 21 | @font-face { 22 | font-family: "Liberation Sans"; 23 | src: 24 | url("fonts/LiberationSans-Italic.woff2") format("woff2"), 25 | url("fonts/LiberationSans-Italic.woff") format("woff"); 26 | font-weight: normal; 27 | font-style: italic; 28 | font-display: swap; 29 | } 30 | 31 | @font-face { 32 | font-family: "Liberation Sans"; 33 | src: 34 | url("fonts/LiberationSans.woff2") format("woff2"), 35 | url("fonts/LiberationSans.woff") format("woff"); 36 | font-weight: normal; 37 | font-style: normal; 38 | font-display: swap; 39 | } 40 | 41 | @font-face { 42 | font-family: "Liberation Mono"; 43 | src: 44 | url("fonts/LiberationMono.woff2") format("woff2"), 45 | url("fonts/LiberationMono.woff") format("woff"); 46 | font-weight: normal; 47 | font-style: normal; 48 | font-display: swap; 49 | } 50 | 51 | @font-face { 52 | font-family: "Metropolis"; 53 | src: 54 | url("fonts/Metropolis.woff2") format("woff2"), 55 | url("fonts/Metropolis.woff") format("woff"); 56 | font-weight: normal; 57 | font-style: normal; 58 | font-display: swap; 59 | } 60 | 61 | @font-face { 62 | font-family: "GeekdocIcons"; 63 | src: 64 | url("fonts/GeekdocIcons.woff2") format("woff2"), 65 | url("fonts/GeekdocIcons.woff") format("woff"); 66 | font-weight: normal; 67 | font-style: normal; 68 | font-display: swap; 69 | } 70 | 71 | body { 72 | font-family: var(--body-font-family); 73 | } 74 | 75 | code, 76 | .gdoc-error__title { 77 | font-family: var(--code-font-family); 78 | } 79 | 80 | .gdoc-header { 81 | font-family: var(--header-font-family); 82 | } 83 | -------------------------------------------------------------------------------- /layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | {{ partial "head/meta" . }} 9 | 10 | {{- if eq .Kind "home" -}} 11 | {{ .Site.Title }} 12 | {{- else -}} 13 | {{ printf "%s | %s" (partial "utils/title" .) .Site.Title }} 14 | {{- end -}} 15 | 16 | 17 | {{ partial "head/favicons" . }} 18 | {{ partial "head/rel-me" . }} 19 | {{ partial "head/microformats" . }} 20 | {{ partial "head/others" . }} 21 | {{ partial "head/custom" . }} 22 | 23 | 24 | 25 | 28 | 29 | {{ partial "svg-icon-symbols" . }} 30 | 31 | 32 |
35 | {{ $navEnabled := default true .Page.Params.geekdocNav }} 36 | {{ partial "site-header" (dict "Root" . "MenuEnabled" $navEnabled) }} 37 | 38 | 39 |
40 | {{ if $navEnabled }} 41 | 44 | {{ end }} 45 | 46 | 47 |
48 | {{ template "main" . }} 49 | 50 | 51 | {{ $showPrevNext := (default true .Site.Params.geekdocNextPrev) }} 52 | {{ if $showPrevNext }} 53 | 60 | {{ end }} 61 |
62 |
63 | 64 | {{ partial "site-footer" . }} 65 |
66 | 67 | {{ partial "foot" . }} 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/js/accessibility.js: -------------------------------------------------------------------------------- 1 | document.addEventListener("DOMContentLoaded", function () { 2 | const gdocNav = document.querySelector(".gdoc-nav") 3 | const gdocPage = document.querySelector(".gdoc-page") 4 | const menuControl = document.getElementById("menu-control") 5 | 6 | // Helper function for menu navigation accessibility 7 | function updateMenuAccessibility() { 8 | if (!gdocNav || !gdocPage || !menuControl) return 9 | 10 | const isMenuOpen = menuControl.checked 11 | const isDesktop = window.matchMedia("(min-width: 41rem)").matches 12 | 13 | // Set nav accessibility attributes 14 | gdocNav.toggleAttribute("inert", !isDesktop && !isMenuOpen) 15 | gdocNav.setAttribute("aria-hidden", (!isDesktop && !isMenuOpen).toString()) 16 | 17 | // Set page accessibility attributes 18 | gdocPage.toggleAttribute("inert", !isDesktop && isMenuOpen) 19 | gdocPage.setAttribute("aria-hidden", (!isDesktop && isMenuOpen).toString()) 20 | } 21 | 22 | // Process all button role elements 23 | document.querySelectorAll('[role="button"]').forEach((buttonElement) => { 24 | const controlId = buttonElement.parentElement?.getAttribute("for") 25 | if (!controlId) return 26 | 27 | const controlElement = document.getElementById(controlId) 28 | if (!controlElement || controlElement.type !== "checkbox") return 29 | 30 | // Set initial accessibility state 31 | buttonElement.setAttribute("aria-pressed", controlElement.checked) 32 | 33 | // Handle accessibility updates 34 | const updateButton = () => { 35 | buttonElement.setAttribute("aria-pressed", controlElement.checked) 36 | if (controlId === "menu-control") updateMenuAccessibility() 37 | } 38 | 39 | // Event listeners 40 | buttonElement.addEventListener("click", updateButton) 41 | buttonElement.addEventListener("keydown", (event) => { 42 | if (event.key === "Enter") { 43 | controlElement.checked = !controlElement.checked 44 | updateButton() 45 | event.preventDefault() 46 | } 47 | }) 48 | }) 49 | 50 | // Initial call and resize handler 51 | updateMenuAccessibility() 52 | window.addEventListener("resize", updateMenuAccessibility) 53 | }) 54 | -------------------------------------------------------------------------------- /src/js/index.js: -------------------------------------------------------------------------------- 1 | import Clipboard from "clipboard" 2 | import "./accessibility.js" 3 | 4 | document.addEventListener("DOMContentLoaded", function () { 5 | let clipboard = new Clipboard(".clip") 6 | 7 | clipboard.on("success", function (e) { 8 | const trigger = e.trigger 9 | 10 | if (trigger.hasAttribute("data-copy-feedback")) { 11 | trigger.classList.add("gdoc-post__codecopy--success", "gdoc-post__codecopy--out") 12 | trigger.querySelector(".gdoc-icon.copy").classList.add("hidden") 13 | trigger.querySelector(".gdoc-icon.check").classList.remove("hidden") 14 | 15 | setTimeout(function () { 16 | trigger.classList.remove("gdoc-post__codecopy--success", "gdoc-post__codecopy--out") 17 | trigger.querySelector(".gdoc-icon.copy").classList.remove("hidden") 18 | trigger.querySelector(".gdoc-icon.check").classList.add("hidden") 19 | }, 3000) 20 | } 21 | 22 | e.clearSelection() 23 | }) 24 | 25 | document.querySelectorAll(".highlight").forEach((highlightDiv) => createCopyButton(highlightDiv)) 26 | }) 27 | 28 | function createCopyButton(highlightDiv) { 29 | const button = document.createElement("span") 30 | 31 | let codeSelector = "pre > code" 32 | if (highlightDiv.querySelector(".lntable")) { 33 | codeSelector = ".lntable .lntd:last-child pre > code" 34 | } 35 | 36 | const codeContainer = highlightDiv.querySelector(codeSelector) 37 | if (codeContainer !== null) { 38 | const codeContent = codeContainer.innerText.trim() 39 | 40 | button.classList.add("flex", "align-center", "justify-center", "clip", "gdoc-post__codecopy") 41 | button.type = "button" 42 | button.innerHTML = 43 | '' + 44 | '' 45 | button.setAttribute("data-clipboard-text", codeContent) 46 | button.setAttribute("data-copy-feedback", "Copied!") 47 | button.setAttribute("role", "button") 48 | button.setAttribute("aria-label", "Copy") 49 | 50 | highlightDiv.classList.add("gdoc-post__codecontainer") 51 | highlightDiv.insertBefore(button, highlightDiv.firstChild) 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /exampleSite/content/en/asciidoc/admonitions.adoc: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "Admonitions" 3 | +++ 4 | 5 | // cspell:ignore toclevels 6 | 7 | :toc: 8 | :toclevels: 2 9 | 10 | {{< toc >}} 11 | 12 | == Admonition types 13 | 14 | There are certain statements you may want to draw attention to by taking them out of the content's flow and labeling them with a priority. These are called admonitions. 15 | 16 | ```tpl 17 | [NOTE|TIP|IMPORTANT|CAUTION|WARNING] 18 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 19 | Ornateness bland it ex enc, est yeti am bongo detract re. 20 | ``` 21 | 22 | === Example 23 | 24 | [NOTE] 25 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 26 | Ornateness bland it ex enc, est yeti am bongo detract re. 27 | 28 | [TIP] 29 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 30 | Ornateness bland it ex enc, est yeti am bongo detract re. 31 | 32 | [IMPORTANT] 33 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 34 | Ornateness bland it ex enc, est yeti am bongo detract re. 35 | 36 | [CAUTION] 37 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 38 | Ornateness bland it ex enc, est yeti am bongo detract re. 39 | 40 | [WARNING] 41 | ==== 42 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 43 | Ornateness bland it ex enc, est yeti am bongo detract re. 44 | 45 | Romanesque acclimates investiture. 46 | ==== 47 | 48 | == Admonition icons 49 | 50 | Icons can be added by setting a unicode glyph or a character reference to the `tip-caption` attribute: 51 | 52 | ```text 53 | :tip-caption: 💡 54 | 55 | [TIP] 56 | It's possible to use Unicode glyphs as admonition icons. 57 | ``` 58 | 59 | ```text 60 | :tip-caption: pass:[🔥] 61 | 62 | [TIP] 63 | It's possible to use Unicode glyphs as admonition icons. 64 | ``` 65 | 66 | === Example 67 | 68 | :tip-caption: 💡 69 | 70 | [TIP] 71 | It's possible to use Unicode glyphs as admonition icons. 72 | 73 | 74 | :tip-caption: pass:[🔥] 75 | 76 | [TIP] 77 | It's possible to use Unicode glyphs as admonition icons. 78 | -------------------------------------------------------------------------------- /src/icons/gitea.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | gitea 4 | 5 | 6 | -------------------------------------------------------------------------------- /.lighthouserc.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ci: 3 | collect: 4 | numberOfRuns: 3 5 | staticDistDir: exampleSite/public 6 | url: 7 | - http://localhost/ 8 | - http://localhost/404.html 9 | - http://localhost/usage/getting-started/ 10 | settings: 11 | chromeFlags: "--no-sandbox --headless --disable-dev-shm-usage" 12 | onlyCategories: ["performance", "accessibility", "best-practices", "seo"] 13 | skipAudits: 14 | [ 15 | "color-contrast", 16 | "uses-long-cache-ttl", 17 | "csp-xss", 18 | "bf-cache", 19 | "is-crawlable", 20 | "image-size-responsive", 21 | "render-blocking-resources", 22 | "largest-contentful-paint", 23 | "unused-css-rules", 24 | "network-dependency-tree-insight", 25 | "legacy-javascript", 26 | "errors-in-console", 27 | "max-potential-fid", 28 | "interactive", 29 | "dom-size", 30 | "forced-reflow-insight", 31 | "unused-javascript" 32 | ] 33 | assert: 34 | preset: "lighthouse:no-pwa" 35 | assertions: 36 | color-contrast: off 37 | uses-long-cache-ttl: off 38 | csp-xss: off 39 | # FIXME: https://github.com/GoogleChrome/lighthouse/issues/14957 40 | bf-cache: off 41 | is-crawlable: off 42 | image-size-responsive: off 43 | render-blocking-resources: off 44 | largest-contentful-paint: off 45 | unused-css-rules: off 46 | network-dependency-tree-insight: off 47 | legacy-javascript: off 48 | errors-in-console: off 49 | max-potential-fid: off 50 | interactive: off 51 | dom-size: off 52 | forced-reflow-insight: off 53 | unused-javascript: off 54 | total-byte-weight: warn 55 | identical-links-same-purpose: warn 56 | tap-targets: warn 57 | unsized-images: warn 58 | # FIXME: https://github.com/GoogleChrome/lighthouse/issues/11460 59 | categories:performance: 60 | - warn 61 | - minScore: 0.95 62 | categories:accessibility: 63 | - error 64 | - minScore: 1 65 | categories:seo: 66 | - error 67 | - minScore: 0.95 68 | upload: 69 | target: filesystem 70 | outputDir: lhci_reports 71 | -------------------------------------------------------------------------------- /exampleSite/content/en/features/icon-sets.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Icon Sets 3 | # cSpell:ignore svgsprit.es 4 | --- 5 | 6 | {{< toc >}} 7 | 8 | ## Custom icon sets 9 | 10 | The only supported source for custom icons are SVG sprites. Some icon frameworks provides ready to use sprites e.g. FontAwesome. If the framework don't provide sprites, you can create your own from raw SVG icons. There are a lot of tools available to create sprites, please choose one that fits your need. One solution could be [svgsprit.es](https://svgsprit.es/). 11 | 12 | Regardless of which tool (or existing sprite) you choose, there are a few requirements that must be met: 13 | 14 | 1. The sprite must be a valid **SVG** file. 15 | 2. You have to ensure to **hide the sprite**. Apply the predefined class `svg-sprite` or `hidden` to the root element of your sprite or add a small piece of inline CSS e.g. `style="display: none;"`. 16 | 3. Save the sprite to the folder `assets/sprites` right beside your `content` folder. 17 | 18 | The result of a valid minimal SVG sprite file could look like this: 19 | 20 | ```xml 21 | 22 | 23 | 24 | 25 | 26 | ``` 27 | 28 | **Example:** 29 | 30 | FontAwesome provides three pre-build sprites included in the regular Web download pack, `sprites/brands.svg`, `sprites/regular.svg` and `sprites/solid.svg`. Choose your sprite to use and copy it to your project's root directory into `assets/sprites`, right beside your `content` folder: 31 | 32 | ```bash 33 | my_project/ 34 | ├── assets 35 | │   └── sprites 36 | │   └── regular.svg 37 | ├── config.yaml 38 | ├── content 39 | │   ├── _index.md 40 | │   ├── ... 41 | ``` 42 | 43 | That's it! The theme will auto-load all available SVG sprites provided in the assets folder. To use the icons e.g. in the [bundle menu](/usage/menus/#bundle-menu), you need to lookup the id of the icon. An example would be `thumbs-up` {{< icon "thumbs-up" >}}. There is also a [shortcode](/shortcodes/icons/) available. 44 | 45 | ## Build-in icons 46 | 47 | The theme bundles just a small set of hand crafted icons. 48 | 49 | {{< sprites >}} 50 | -------------------------------------------------------------------------------- /layouts/shortcodes/avatar.html: -------------------------------------------------------------------------------- 1 | {{- $source := ($.Page.Resources.ByType "image").GetMatch (printf "%s" (.Get "name")) }} 2 | {{- $customAlt := .Get "alt" }} 3 | {{- $customSize := .Get "size" | lower }} 4 | {{- $customAnchor := default "smart" (.Get "anchor") | title }} 5 | {{- $data := newScratch }} 6 | 7 | {{- with $source }} 8 | {{- $caption := default .Title $customAlt }} 9 | {{- $isSVG := (eq .MediaType.SubType "svg") }} 10 | {{- $origin := . -}} 11 | 12 | {{- if $isSVG }} 13 | {{- $data.SetInMap "size" "tiny" "160" }} 14 | {{- $data.SetInMap "size" "small" "300" }} 15 | {{- $data.SetInMap "size" "medium" "600" }} 16 | {{- $data.SetInMap "size" "large" "900" }} 17 | {{- else }} 18 | {{- $data.SetInMap "size" "tiny" (printf "160x160 %s" $customAnchor) }} 19 | {{- $data.SetInMap "size" "small" (printf "300x300 %s" $customAnchor) }} 20 | {{- $data.SetInMap "size" "medium" (printf "600x600 %s" $customAnchor) }} 21 | {{- $data.SetInMap "size" "large" (printf "900x900 %s" $customAnchor) }} 22 | {{- end -}} 23 | 24 | 57 | {{- end }} 58 | -------------------------------------------------------------------------------- /src/sass/_asciidoc.scss: -------------------------------------------------------------------------------- 1 | @use "sass:color"; 2 | @use "defaults"; 3 | 4 | .admonitionblock { 5 | $root: &; 6 | 7 | margin: defaults.$padding-16 0; 8 | padding: 0; 9 | 10 | border: defaults.$border-1 solid var(--accent-color); 11 | border-left: defaults.$border-4 solid var(--accent-color); 12 | border-radius: defaults.$border-radius; 13 | 14 | @each $name, $color in defaults.$hint-colors { 15 | &.#{$name} { 16 | border-color: $color; 17 | color: defaults.$body-font-color; 18 | 19 | td.icon { 20 | background-color: color.adjust($color, $alpha: -0.9); 21 | border-start-start-radius: inherit; 22 | border-start-end-radius: inherit; 23 | position: relative; 24 | z-index: -10; 25 | outline: color.adjust($color, $alpha: -0.9); 26 | } 27 | } 28 | } 29 | 30 | .table-wrap { 31 | margin: 0; 32 | } 33 | 34 | table { 35 | margin: 0 !important; 36 | padding: 0 !important; 37 | 38 | tr { 39 | border: 0 !important; 40 | } 41 | 42 | td { 43 | display: block; 44 | padding: defaults.$padding-4 defaults.$padding-16 !important; 45 | 46 | &:first-child { 47 | background-color: color.scale(defaults.$gray-600, $alpha: -95%); 48 | font-weight: bold; 49 | 50 | &.icon { 51 | margin-left: -5px; 52 | 53 | @each $name, $icon in defaults.$hint-icons { 54 | i.fa.icon-#{$name} { 55 | width: defaults.$font-size-24; 56 | height: defaults.$font-size-24; 57 | position: relative; 58 | 59 | &::before { 60 | content: ""; 61 | position: absolute; 62 | left: 0; 63 | top: 50%; 64 | transform: translateY(-50%); 65 | width: defaults.$font-size-24; 66 | height: defaults.$font-size-24; 67 | mask-image: url(img/geekdoc-stack.svg##{$icon}); 68 | mask-repeat: no-repeat; 69 | mask-size: contain; 70 | background-color: var(--body-font-color); 71 | } 72 | 73 | &::after { 74 | color: var(--body-font-color); 75 | content: attr(title); 76 | font-style: normal; 77 | padding-left: defaults.$padding-32; 78 | } 79 | } 80 | } 81 | } 82 | } 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /exampleSite/content/en/shortcodes/hints.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Hints 3 | --- 4 | 5 | Hint shortcode can be used as hint/alerts/notification block. 6 | 7 | ## Usage 8 | 9 | 10 | ```tpl 11 | {{}} 12 | **Markdown content**\ 13 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 14 | Ornateness bland it ex enc, est yeti am bongo detract re. 15 | {{}} 16 | ``` 17 | 18 | 19 | ### Attributes 20 | 21 | 22 | 23 | {{< propertylist name=shortcode-hints sort=name order=asc >}} 24 | 25 | 26 | 27 | ## Example 28 | 29 | {{< hint type=note >}} 30 | **Markdown content**\ 31 | Dolor sit, sumo unique `argument um no`. Gracie nominal id xiv. Romanesque acclimates investiture. 32 | Ornateness bland it ex enc, est yeti am bongo detract re. 33 | {{< /hint >}} 34 | 35 | {{< hint type=tip >}} 36 | **Markdown content**\ 37 | Dolor sit, sumo unique `argument um no`. Gracie nominal id xiv. Romanesque acclimates investiture. 38 | Ornateness bland it ex enc, est yeti am bongo detract re. 39 | {{< /hint >}} 40 | 41 | {{< hint type=important >}} 42 | **Markdown content**\ 43 | Dolor sit, sumo unique `argument um no`. Gracie nominal id xiv. Romanesque acclimates investiture. 44 | Ornateness bland it ex enc, est yeti am bongo detract re. 45 | {{< /hint >}} 46 | 47 | {{< hint type=caution >}} 48 | **Markdown content**\ 49 | Dolor sit, sumo unique `argument um no`. Gracie nominal id xiv. Romanesque acclimates investiture. 50 | Ornateness bland it ex enc, est yeti am bongo detract re. 51 | {{< /hint >}} 52 | 53 | {{< hint type=warning >}} 54 | **Markdown content**\ 55 | Dolor sit, sumo unique `argument um no`. Gracie nominal id xiv. Romanesque acclimates investiture. 56 | Ornateness bland it ex enc, est yeti am bongo detract re. 57 | 58 | Romanesque acclimates investiture. 59 | {{< /hint >}} 60 | 61 | Example with a custom icon and title: 62 | 63 | 64 | 65 | {{< hint type=note icon=gdoc_github title=GitHub >}} 66 | **Markdown content**\ 67 | Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclimates investiture. 68 | Ornateness bland it ex enc, est yeti am bongo detract re. 69 | {{< /hint >}} 70 | 71 | 72 | -------------------------------------------------------------------------------- /layouts/partials/microformats/opengraph.html: -------------------------------------------------------------------------------- 1 | {{ $isPage := or (and (ne .Type "posts") (in "section page" .Kind )) (and (eq .Type "posts") (eq .Kind "page")) }} 2 | 3 | {{- if ne .Kind "home" }} 4 | 8 | {{- end }} 9 | {{- with .Site.Title }} 10 | 11 | {{- end }} 12 | {{- with partial "utils/featured" . }} 13 | 14 | {{- end }} 15 | {{- with partial "utils/description" . }} 16 | 17 | {{- end }} 18 | 19 | 20 | {{- with .Params.audio }} 21 | 22 | {{- end }} 23 | {{- with .Params.locale }} 24 | 25 | {{- end }} 26 | {{- with .Params.videos }} 27 | {{- range . }} 28 | 29 | {{- end }} 30 | {{- end }} 31 | 32 | {{- /* If it is part of a series, link to related articles */}} 33 | {{- if .Site.Taxonomies.series }} 34 | {{- $permalink := .Permalink -}} 35 | {{- $siteSeries := .Site.Taxonomies.series -}} 36 | {{- with .Params.series }} 37 | {{- range $name := . }} 38 | {{- $series := index $siteSeries ($name | urlize) }} 39 | {{- range $page := first 6 $series.Pages }} 40 | {{- if ne $page.Permalink $permalink }} 41 | 42 | {{- end }} 43 | {{- end }} 44 | {{- end }} 45 | {{- end }} 46 | {{- end }} 47 | 48 | {{ if $isPage -}} 49 | {{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} 50 | 51 | {{- with .PublishDate }} 52 | 56 | {{- end }} 57 | {{- with .Lastmod }} 58 | 62 | {{- end }} 63 | {{- end }} 64 | 65 | {{- /* Facebook Page Admin ID for Domain Insights */}} 66 | {{- with .Site.Params.facebook_admin }} 67 | 68 | {{- end }} 69 | -------------------------------------------------------------------------------- /exampleSite/content/en/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Welcome to the documentation 3 | geekdocNav: false 4 | geekdocAlign: center 5 | geekdocAnchor: false 6 | --- 7 | 8 | 9 | 10 | 11 | [![Build Status](https://ci.thegeeklab.de/api/badges/thegeeklab/hugo-geekdoc/status.svg)](https://ci.thegeeklab.de/repos/thegeeklab/hugo-geekdoc) 12 | [![Hugo Version](https://img.shields.io/badge/hugo-0.124-blue.svg)](https://gohugo.io) 13 | [![GitHub release](https://img.shields.io/github/v/release/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/releases/latest) 14 | [![GitHub contributors](https://img.shields.io/github/contributors/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/graphs/contributors) 15 | [![License: MIT](https://img.shields.io/github/license/thegeeklab/hugo-geekdoc)](https://github.com/thegeeklab/hugo-geekdoc/blob/main/LICENSE) 16 | 17 | 18 | 19 | Geekdoc is a simple Hugo theme for documentations. It is intentionally designed as a fast and lean theme and may not fit the requirements of complex projects. If a more feature-complete theme is required there are a lot of great alternatives out there. 20 | 21 | {{< button size="large" relref="usage/getting-started/" >}}Getting Started{{< /button >}} 22 | 23 | ## Feature overview 24 | 25 | {{< columns >}} 26 | 27 | ### Clean and simple design 28 | 29 | Stay focused on exploring the content and don't get overwhelmed by a complex design. 30 | 31 | <---> 32 | 33 | ### Light and mobile-friendly 34 | 35 | The theme is powered by less than 1 MB and looks impressive on mobile devices as well as on a regular Desktop. 36 | 37 | <---> 38 | 39 | ### Easy customization 40 | 41 | The look and feel can be easily customized by CSS custom properties (variables), features can be adjusted by Hugo parameters. 42 | 43 | {{< /columns >}} 44 | 45 | {{< columns >}} 46 | 47 | ### Zero initial configuration 48 | 49 | Getting started in minutes. The theme is shipped with a default configuration and works out of the box. 50 | 51 | <---> 52 | 53 | ### Handy shortcodes 54 | 55 | We included some (hopefully) useful custom shortcodes so you don't have to and can focus on writing amazing docs. 56 | 57 | <---> 58 | 59 | ### Dark mode 60 | 61 | Powerful dark mode that detects your system preferences or can be controlled by a toggle switch. 62 | 63 | {{< /columns >}} 64 | -------------------------------------------------------------------------------- /layouts/partials/menu-bundle-np.html: -------------------------------------------------------------------------------- 1 | {{ $current := . }} 2 | {{ $site := .Site }} 3 | {{ $current.Scratch.Set "prev" false }} 4 | {{ $current.Scratch.Set "getNext" false }} 5 | 6 | {{ $current.Scratch.Set "nextPage" false }} 7 | {{ $current.Scratch.Set "prevPage" false }} 8 | 9 | {{ template "menu-bundle-np" dict "sect" $.Site.Data.menu.main.main "current" $current "site" $site }} 10 | 11 | {{ define "menu-bundle-np" }} 12 | {{ $current := .current }} 13 | {{ $site := .site }} 14 | 15 | {{ range sort (default (seq 0) .sect) "weight" }} 16 | {{ $current.Scratch.Set "current" $current }} 17 | {{ $current.Scratch.Set "site" $site }} 18 | 19 | {{ $ref := default false .ref }} 20 | {{ if $ref }} 21 | {{ $site := $current.Scratch.Get "site" }} 22 | {{ $this := $site.GetPage .ref }} 23 | {{ $current := $current.Scratch.Get "current" }} 24 | 25 | {{ if reflect.IsMap .name }} 26 | {{ $current.Scratch.Set "refName" (index .name $site.Language.Lang) }} 27 | {{ else }} 28 | {{ $current.Scratch.Set "refName" .name }} 29 | {{ end }} 30 | {{ $name := $current.Scratch.Get "refName" }} 31 | 32 | {{ if $current.Scratch.Get "getNext" }} 33 | {{ $current.Scratch.Set "nextPage" (dict "name" $name "this" $this) }} 34 | {{ $current.Scratch.Set "getNext" false }} 35 | {{ end }} 36 | 37 | {{ if eq $current $this }} 38 | {{ $current.Scratch.Set "prevPage" ($current.Scratch.Get "prev") }} 39 | {{ $current.Scratch.Set "getNext" true }} 40 | {{ end }} 41 | 42 | {{ $current.Scratch.Set "prev" (dict "name" $name "this" $this) }} 43 | {{ end }} 44 | 45 | {{ $sub := default false .sub }} 46 | {{ if $sub }} 47 | {{ template "menu-bundle-np" dict "sect" $sub "current" ($current.Scratch.Get "current") "site" ($current.Scratch.Get "site") }} 48 | {{ end }} 49 | {{ end }} 50 | {{ end }} 51 | 52 | 53 | {{ with ($current.Scratch.Get "prevPage") }} 54 | 59 | gdoc_arrow_left_alt 60 | {{ .name }} 61 | 62 | {{ end }} 63 | 64 | 65 | {{ with ($current.Scratch.Get "nextPage") }} 66 | 71 | {{ .name }} 72 | gdoc_arrow_right_alt 73 | 74 | {{ end }} 75 | 76 | -------------------------------------------------------------------------------- /layouts/shortcodes/img.html: -------------------------------------------------------------------------------- 1 | {{- $source := ($.Page.Resources.ByType "image").GetMatch (printf "%s" (.Get "name")) }} 2 | {{- $customAlt := .Get "alt" }} 3 | {{- $customSize := .Get "size" | lower }} 4 | {{- $lazyLoad := default (default true $.Site.Params.geekdocImageLazyLoading) (.Get "lazy") }} 5 | {{- $data := newScratch }} 6 | 7 | {{- with $source }} 8 | {{- $caption := default .Title $customAlt }} 9 | {{- $isSVG := (eq .MediaType.SubType "svg") }} 10 | {{- $origin := . }} 11 | 12 | {{- if $isSVG }} 13 | {{- $data.SetInMap "size" "tiny" "320" }} 14 | {{- $data.SetInMap "size" "small" "600" }} 15 | {{- $data.SetInMap "size" "medium" "1200" }} 16 | {{- $data.SetInMap "size" "large" "1800" }} 17 | {{- else }} 18 | {{- $data.SetInMap "size" "tiny" "320x"}} 19 | {{- $data.SetInMap "size" "small" "600x" }} 20 | {{- $data.SetInMap "size" "medium" "1200x" }} 21 | {{- $data.SetInMap "size" "large" "1800x" }} 22 | {{- end -}} 23 | 24 |
25 |
26 | 27 | 28 | {{- $size := $data.Get "size" }} 29 | {{- if not $isSVG }} 30 | {{- if ne $customSize "origin" }} 31 | 38 | {{- end }} 39 | {{- end }} 40 | {{ $caption }} 53 | 54 | 55 | {{- with $caption }} 56 |
57 | {{ . }} 58 | {{- with $source.Params.credits }} 59 | {{ printf " (%s)" . | $.Page.RenderString }} 60 | {{- end }} 61 |
62 | {{- end }} 63 |
64 |
65 | {{- end }} 66 | -------------------------------------------------------------------------------- /src/sass/_mobile.scss: -------------------------------------------------------------------------------- 1 | @use "defaults"; 2 | 3 | @media screen and (max-width: defaults.$sm-breakpoint) { 4 | .gdoc-nav { 5 | margin-left: -(defaults.$menu-width); 6 | font-size: defaults.$font-size-base; 7 | 8 | &__control { 9 | display: inline-block; 10 | } 11 | } 12 | 13 | .gdoc-header { 14 | svg.gdoc-icon { 15 | width: defaults.$font-size-24; 16 | height: defaults.$font-size-24; 17 | } 18 | } 19 | 20 | .gdoc-brand { 21 | font-size: defaults.$font-size-24; 22 | line-height: defaults.$font-size-24; 23 | 24 | &__img { 25 | display: none; 26 | } 27 | } 28 | 29 | .gdoc-menu-header { 30 | &__items { 31 | display: none; 32 | } 33 | 34 | &__control { 35 | svg.gdoc-icon.gdoc_keyboard_arrow_right { 36 | display: none; 37 | } 38 | } 39 | 40 | &__control, 41 | &__home { 42 | display: flex; 43 | } 44 | } 45 | 46 | .gdoc-error { 47 | padding: defaults.$padding-96 defaults.$padding-16; 48 | 49 | svg.gdoc-icon { 50 | width: defaults.$font-size-96; 51 | height: defaults.$font-size-96; 52 | } 53 | 54 | &__message { 55 | padding-left: defaults.$padding-32; 56 | } 57 | 58 | &__line { 59 | padding: defaults.$padding-4 0; 60 | } 61 | 62 | &__title { 63 | font-size: defaults.$font-size-32; 64 | } 65 | } 66 | 67 | .gdoc-page__header .breadcrumb, 68 | .hidden-mobile { 69 | display: none; 70 | } 71 | 72 | .flex-mobile-column { 73 | flex-direction: column; 74 | 75 | &.gdoc-columns { 76 | margin: defaults.$padding-32 0; 77 | } 78 | 79 | .gdoc-columns__content { 80 | min-width: auto; 81 | margin: 0; 82 | } 83 | } 84 | 85 | .wrapper:has(#menu-control:checked) { 86 | .gdoc-nav nav, 87 | .gdoc-page { 88 | transform: translateX(defaults.$menu-width); 89 | } 90 | 91 | .gdoc-page { 92 | opacity: 0.25; 93 | } 94 | 95 | svg.gdoc-icon.gdoc_menu { 96 | display: none; 97 | } 98 | 99 | svg.gdoc-icon.gdoc_arrow_back { 100 | display: inline-block; 101 | } 102 | } 103 | 104 | .wrapper:has(#menu-header-control:checked) { 105 | .gdoc-brand { 106 | display: none; 107 | } 108 | 109 | .gdoc-menu-header { 110 | &__items { 111 | display: flex; 112 | } 113 | 114 | &__control { 115 | svg.gdoc-icon.gdoc_keyboard_arrow_left { 116 | display: none; 117 | } 118 | svg.gdoc-icon.gdoc_keyboard_arrow_right { 119 | display: inline-block; 120 | } 121 | } 122 | } 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /layouts/partials/microformats/schema.html: -------------------------------------------------------------------------------- 1 | {{ $isPage := or (and (ne .Type "posts") (in "section page" .Kind )) (and (eq .Type "posts") (eq .Kind "page")) }} 2 | {{- if eq .Kind "home" }} 3 | 21 | {{- else if $isPage }} 22 | 70 | {{- end }} 71 | -------------------------------------------------------------------------------- /layouts/shortcodes/propertylist.html: -------------------------------------------------------------------------------- 1 | {{- $name := .Get "name" -}} 2 | {{- $sort := .Get "sort" -}} 3 | {{- $order := default "asc" (.Get "order") -}} 4 | {{- $showAnchor := (and (default true .Page.Params.geekdocAnchor) (default true .Page.Site.Params.geekdocAnchor)) -}} 5 | 6 | {{- if .Site.Data.properties }} 7 |
8 | {{- with (index .Site.Data.properties (split $name ".")) }} 9 | {{- $properties := .properties }} 10 | {{- with $sort }} 11 | {{- $properties = (sort $properties . $order) }} 12 | {{- end }} 13 | {{- range $properties }} 14 | {{- $uniqueAnchor := anchorize (printf "%s-%s" $name .name) | safeHTML }} 15 |
16 | {{ .name }} 17 | {{- if .required }} 18 | {{ i18n "propertylist_required" | lower }} 19 | {{- else }} 20 | {{ i18n "propertylist_optional" | lower }} 21 | {{- end }} 22 | {{- with .type }} 23 | {{ . }} 24 | {{- end }} 25 | 26 | {{- with .tags }} 27 | {{- $tags := . }} 28 | {{- if reflect.IsMap $tags }} 29 | {{- $tags = (index $tags $.Site.Language.Lang) }} 30 | {{- end }} 31 | {{- range $tags }} 32 | {{ . }} 33 | {{- end }} 34 | {{- end }} 35 | {{- if $showAnchor }} 36 | 37 | 38 | 39 | {{- end }} 40 |
41 |
42 |
43 | {{- with .description }} 44 | {{- $desc := . }} 45 | {{- if reflect.IsMap $desc }} 46 | {{- $desc = (index $desc $.Site.Language.Lang) }} 47 | {{- end }} 48 | {{ $desc | $.Page.RenderString }} 49 | {{- end }} 50 |
51 |
52 | {{- with default "none" (.defaultValue | string) }} 53 | {{ i18n "propertylist_default" | title }}: 54 | {{ . }} 55 | {{- end }} 56 |
57 |
58 | {{- end }} 59 | {{- end }} 60 |
61 | {{- end }} 62 | -------------------------------------------------------------------------------- /exampleSite/content/en/features/code-blocks.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Code Blocks 3 | --- 4 | 5 | There are several ways to add code blocks. Most of them work out of the box, only the Hugo shortcode `` needs to be configured to work properly. The theme also provides some additional features like a copy button and an option to set the maximum length of code blocks. Both of these functions and the dependent formatting rely on the `.highlight` CSS class. You must ensure that you always assign a language to your code blocks if you want to use these functions. If you do not want to apply syntax highlighting, you can also specify `plain` or `text` as the language. 6 | 7 | {{< toc >}} 8 | 9 | ## Inline code 10 | 11 | To display an inline shortcode use single quotes: 12 | 13 | ```plain 14 | `some code` 15 | ``` 16 | 17 | **Example:** `some code` with a [`link`](#) 18 | 19 | ## Code blocks 20 | 21 | Code blocks can be uses without language specification: 22 | 23 | ````markdown 24 | ```plain 25 | some code 26 | ``` 27 | ```` 28 | 29 | **Example:** 30 | 31 | ```plain 32 | some code 33 | ``` 34 | 35 | ... or if you need language specific syntax highlighting: 36 | 37 | ````markdown 38 | ```shell 39 | # some code 40 | echo "Hello world" 41 | ``` 42 | ```` 43 | 44 | **Example:** 45 | 46 | ```shell 47 | # some code 48 | echo "Hello World" 49 | ``` 50 | 51 | ## Highlight shortcode 52 | 53 | Hugo has a build-in shortcode for syntax highlighting. To work properly with this theme, you have to set following options in your site configuration: 54 | 55 | {{< tabs "uniqueid" >}} 56 | {{< tab "TOML" >}} 57 | 58 | ```toml 59 | pygmentsUseClasses=true 60 | pygmentsCodeFences=true 61 | ``` 62 | 63 | {{< /tab >}} 64 | {{< tab "YAML" >}} 65 | 66 | ```yaml 67 | pygmentsUseClasses: true 68 | pygmentsCodeFences: true 69 | ``` 70 | 71 | {{< /tab >}} 72 | {{< /tabs >}} 73 | 74 | You can use it like every other shortcode: 75 | 76 | 77 | ```markdown 78 | {{}} 79 | # some code 80 | echo "Hello World" 81 | {{}} 82 | ``` 83 | 84 | **Example:** 85 | 86 | 87 | 88 | 89 | {{< highlight Shell "linenos=table" >}} 90 | # some code 91 | echo "Hello World" 92 | {{< /highlight >}} 93 | 94 | 95 | 96 | ## Gist Shortcode 97 | 98 | The Gist shortcode is a built-in Hugo shortcode to load GitHub gists. For details usage information please check the Hugo [documentation](https://gohugo.io/content-management/shortcodes/#gist). 99 | 100 | 101 | ```markdown 102 | {{}} 103 | ``` 104 | 105 | **Example:** 106 | 107 | {{< gist spf13 7896402 >}} 108 | --------------------------------------------------------------------------------