diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md
deleted file mode 100755
index b79faa8..0000000
--- a/.chglog/CHANGELOG.tpl.md
+++ /dev/null
@@ -1,23 +0,0 @@
-# Changelog
-
-{{ range .Versions -}}
-## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
-
-{{ range .CommitGroups -}}
-### {{ .Title }}
-
-{{ range .Commits -}}
-- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ (regexReplaceAll "(.*)/issues/(.*)" (regexReplaceAll "(Co-\\w*-by.*)" .Subject "") "${1}/pull/${2}") | trim }}
-{{ end }}
-{{- end -}}
-
-{{- if .NoteGroups -}}
-{{ range .NoteGroups -}}
-### {{ .Title }}
-
-{{ range .Notes }}
-{{ .Body }}
-{{ end }}
-{{ end -}}
-{{ end -}}
-{{ end -}}
diff --git a/.chglog/config.yml b/.chglog/config.yml
deleted file mode 100755
index de38198..0000000
--- a/.chglog/config.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-style: github
-template: CHANGELOG.tpl.md
-info:
- title: CHANGELOG
- repository_url: https://github.com/thegeeklab/hugo-geekdoc
-options:
- commit_groups:
- title_maps:
- feat: Features
- fix: Bug Fixes
- perf: Performance Improvements
- refactor: Code Refactoring
- chore: Others
- test: Testing
- ci: CI Pipeline
- docs: Documentation
- header:
- pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
- pattern_maps:
- - Type
- - Scope
- - Subject
- notes:
- keywords:
- - BREAKING CHANGE
diff --git a/.eslintrc.json b/.eslintrc.json
index 1cfcc37..e946021 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,22 +1,13 @@
{
"env": {
"browser": true,
- "es6": true,
- "amd": true
+ "es2017": true
},
"extends": ["plugin:prettier/recommended"],
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module",
- "requireConfigFile": false,
- "allowImportExportEverywhere": true
+ "requireConfigFile": false
},
- "plugins": ["prettier"],
- "rules": {
- "require-await": "warn"
- },
- "globals": {
- "require": false,
- "requirejs": false
- }
+ "plugins": ["prettier"]
}
diff --git a/.gitsv/config.yml b/.gitsv/config.yml
new file mode 100644
index 0000000..acaf506
--- /dev/null
+++ b/.gitsv/config.yml
@@ -0,0 +1,47 @@
+---
+version: "1.1"
+
+versioning:
+ update-major: []
+ update-minor: [feat]
+ update-patch: [fix, perf, refactor, chore, test, ci, docs]
+
+tag:
+ pattern: "v%d.%d.%d"
+
+release-notes:
+ sections:
+ - name: Features
+ commit-types: [feat]
+ section-type: commits
+ - name: Bug Fixes
+ commit-types: [fix]
+ section-type: commits
+ - name: Performance Improvements
+ commit-types: [perf]
+ section-type: commits
+ - name: Code Refactoring
+ commit-types: [refactor]
+ section-type: commits
+ - name: Others
+ commit-types: [chore]
+ section-type: commits
+ - name: Testing
+ commit-types: [test]
+ section-type: commits
+ - name: CI Pipeline
+ commit-types: [ci]
+ section-type: commits
+ - name: Documentation
+ commit-types: [docs]
+ section-type: commits
+ - name: BREAKING CHANGES
+ section-type: breaking-changes
+
+commit-message:
+ footer:
+ issue:
+ key: issue
+ add-value-prefix: "#"
+ issue:
+ regex: "#?[0-9]+"
diff --git a/.htmlvalidate.json b/.htmlvalidate.json
new file mode 100644
index 0000000..55642f7
--- /dev/null
+++ b/.htmlvalidate.json
@@ -0,0 +1,8 @@
+{
+ "extends": ["html-validate:standard"],
+ "rules": {
+ "element-required-content": "off",
+ "element-permitted-content": "off",
+ "no-raw-characters": "off"
+ }
+}
diff --git a/.lighthouserc.yml b/.lighthouserc.yml
index 8076332..978d57e 100644
--- a/.lighthouserc.yml
+++ b/.lighthouserc.yml
@@ -9,8 +9,18 @@ ci:
- http://localhost/usage/getting-started/
settings:
chromeFlags: "--no-sandbox"
- onlyCategories: ['performance', 'accessibility', 'best-practices', 'seo']
- skipAudits: ["color-contrast", "uses-long-cache-ttl", "csp-xss", "bf-cache", "is-crawlable", "image-size-responsive"]
+ onlyCategories: ["performance", "accessibility", "best-practices", "seo"]
+ skipAudits:
+ [
+ "color-contrast",
+ "uses-long-cache-ttl",
+ "csp-xss",
+ "bf-cache",
+ "is-crawlable",
+ "image-size-responsive",
+ "render-blocking-resources",
+ "largest-contentful-paint"
+ ]
assert:
preset: "lighthouse:no-pwa"
assertions:
@@ -21,6 +31,10 @@ ci:
bf-cache: off
is-crawlable: off
image-size-responsive: off
+ render-blocking-resources: off
+ largest-contentful-paint: off
+ total-byte-weight: warn
+ identical-links-same-purpose: warn
tap-targets: warn
unsized-images: warn
# FIXME: https://github.com/GoogleChrome/lighthouse/issues/11460
diff --git a/.lycheeignore b/.lycheeignore
new file mode 100644
index 0000000..bbe71df
--- /dev/null
+++ b/.lycheeignore
@@ -0,0 +1,3 @@
+https://github.com/thegeeklab/.+/edit/main/.*
+https://unsplash.com.*
+https://www.color-hex.com.*
diff --git a/.markdownlint.yml b/.markdownlint.yml
index 1a62b25..b413a35 100644
--- a/.markdownlint.yml
+++ b/.markdownlint.yml
@@ -5,3 +5,5 @@ MD041: False
MD042: False
MD004:
style: dash
+MD010:
+ code_blocks: False
diff --git a/.tarignore b/.tarignore
index a3cc03c..8a582b0 100644
--- a/.tarignore
+++ b/.tarignore
@@ -9,8 +9,8 @@
.jsbeautify*
.prettier*
.eslintrc*
-.chglog
-.vnuignore
+.htmlvalidate*
+.lycheeignore*
example*
webpack*
svgsprite*
diff --git a/.vnuignore b/.vnuignore
deleted file mode 100644
index 2727bb9..0000000
--- a/.vnuignore
+++ /dev/null
@@ -1,2 +0,0 @@
-.*border-content.*
-.*Duplicate ID.*
diff --git a/.woodpecker/build-package.yml b/.woodpecker/build-package.yml
index 826ddd1..eed0755 100644
--- a/.woodpecker/build-package.yml
+++ b/.woodpecker/build-package.yml
@@ -6,43 +6,35 @@ when:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
- assets:
+ - name: assets
image: docker.io/library/node:lts
commands:
- - git fetch -tq
- - npm install > /dev/null
+ - npm install --quiet --no-progress
- npm run build
- cat VERSION
environment:
FORCE_COLOR: "true"
- NPM_CONFIG_LOGLEVEL: error
- package:
+ - name: package
image: docker.io/library/node:lts
commands:
- npm run pack
environment:
FORCE_COLOR: "true"
- NPM_CONFIG_LOGLEVEL: error
- checksum:
+ - name: checksum
image: quay.io/thegeeklab/alpine-tools
commands:
- cd dist/ && sha256sum * > ../sha256sum.txt
- changelog-generate:
- image: quay.io/thegeeklab/git-chglog
+ - name: changelog
+ image: quay.io/thegeeklab/git-sv
commands:
- - git fetch -tq
- - git-chglog --no-color --no-emoji -o CHANGELOG.md ${CI_COMMIT_TAG:---next-tag unreleased unreleased}
+ - git sv current-version
+ - git sv release-notes -t ${CI_COMMIT_TAG:-next} -o CHANGELOG.md
+ - cat CHANGELOG.md
- changelog-format:
- image: quay.io/thegeeklab/alpine-tools
- commands:
- - prettier CHANGELOG.md
- - prettier -w CHANGELOG.md
-
- publish-github:
+ - name: publish-github
image: docker.io/plugins/github-release
settings:
api_key:
diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml
index 6f61e67..cec3765 100644
--- a/.woodpecker/docs.yml
+++ b/.woodpecker/docs.yml
@@ -6,23 +6,22 @@ when:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
- markdownlint:
+ - name: markdownlint
image: quay.io/thegeeklab/markdownlint-cli
commands:
- markdownlint 'exampleSite/content/**/*.md' 'README.md' 'CONTRIBUTING.md'
- spellcheck:
+ - name: spellcheck
image: quay.io/thegeeklab/alpine-tools
commands:
- spellchecker --files 'exampleSite/content/**/*.md' 'README.md' -d .dictionary -p spell indefinite-article syntax-urls frontmatter --frontmatter-keys title
environment:
FORCE_COLOR: "true"
- NPM_CONFIG_LOGLEVEL: error
- assets:
+ - name: assets
image: docker.io/library/node:lts
commands:
- - npm install > /dev/null
+ - npm install --quiet --no-progress
- npm run svg-sprite-list
- mkdir -p exampleSite/themes/${CI_REPO_NAME}
- 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
@@ -32,40 +31,39 @@ steps:
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- assets-main:
+ - name: assets-main
image: docker.io/library/node:lts
commands:
- - npm install > /dev/null
+ - npm install --quiet --no-progress
- npm run build
- npm run svg-sprite-list
- mkdir -p exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/${CI_REPO_NAME}
environment:
FORCE_COLOR: "true"
- NPM_CONFIG_LOGLEVEL: error
when:
- event: [pull_request]
- build:
- image: quay.io/thegeeklab/hugo:0.115.2
+ - name: build
+ image: quay.io/thegeeklab/hugo:0.124.1
commands:
- hugo --panicOnWarning -s exampleSite/
- beautify:
+ - name: beautify
image: quay.io/thegeeklab/alpine-tools
commands:
- html-beautify -r -f 'exampleSite/public/**/*.html'
environment:
FORCE_COLOR: "true"
- NPM_CONFIG_LOGLEVEL: error
- publish:
+ - name: publish
image: quay.io/thegeeklab/wp-s3-action
settings:
access_key:
from_secret: s3_access_key
bucket: geekdocs-root
delete: true
- endpoint: https://sp.rknet.org
+ endpoint:
+ from_secret: s3_endpoint
path_style: true
secret_key:
from_secret: s3_secret_access_key
@@ -76,6 +74,7 @@ steps:
- event: [push, manual]
branch:
- ${CI_REPO_DEFAULT_BRANCH}
+ status: [success, failure]
depends_on:
- build-package
diff --git a/.woodpecker/notify.yml b/.woodpecker/notify.yml
index a851904..9957125 100644
--- a/.woodpecker/notify.yml
+++ b/.woodpecker/notify.yml
@@ -8,7 +8,7 @@ when:
runs_on: [success, failure]
steps:
- matrix:
+ - name: matrix
image: quay.io/thegeeklab/wp-matrix
settings:
homeserver:
diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml
index 29e6097..19afeee 100644
--- a/.woodpecker/test.yml
+++ b/.woodpecker/test.yml
@@ -6,49 +6,47 @@ when:
- ${CI_REPO_DEFAULT_BRANCH}
steps:
- eslint:
+ - name: eslint
image: docker.io/library/node:lts
commands:
- - npm install > /dev/null
- - npm run lint
+ - npm install --quiet --no-progress
+ - npm run lint:js
environment:
FORCE_COLOR: "true"
- NPM_CONFIG_LOGLEVEL: error
- assets:
+ - name: assets
image: docker.io/library/node:lts
commands:
- - npm install > /dev/null
+ - npm install --quiet --no-progress
- npm run build
environment:
FORCE_COLOR: "true"
- NPM_CONFIG_LOGLEVEL: error
- testbuild:
- image: quay.io/thegeeklab/hugo:0.115.2
+ - name: testbuild
+ image: quay.io/thegeeklab/hugo:0.124.1
commands:
- mkdir -p exampleSite/themes/ && ln -s $(pwd)/ exampleSite/themes/${CI_REPO_NAME}
- hugo --panicOnWarning -s exampleSite/ -b http://localhost:8000/
- html-validation:
- image: quay.io/thegeeklab/vnu
+ - name: html-validation
+ image: docker.io/library/node:lts
group: test
commands:
- - vnu --skip-non-html --also-check-css --errors-only --filterfile .vnuignore exampleSite/public
-
- link-validation:
- image: quay.io/thegeeklab/link-validator
- group: test
- commands:
- - link-validator --color=always --rate-limit 10 --timeout 60 -e https://github.com/thegeeklab/${CI_REPO_NAME}/edit/main/.* -e https://unsplash.com.*
+ - npm install --quiet --no-progress
+ - npm run lint:html
environment:
- LINK_VALIDATOR_BASE_DIR: exampleSite/public
- LINK_VALIDATOR_RETRIES: "3"
+ FORCE_COLOR: "true"
- page-validation:
- image: quay.io/thegeeklab/lhci:0.12
+ - name: link-validation
+ image: docker.io/lycheeverse/lychee
+ group: test
+ commands:
+ - lychee --no-progress --format detailed exampleSite/content/ README.md
+
+ - name: page-validation
+ image: quay.io/thegeeklab/lhci:0.13
group: test
commands:
- lhci autorun
environment:
- LHCI_SERVER_URL: https://drone-artifact.rknet.org/${CI_REPO_NAME}/
+ LHCI_SERVER_URL: https://ci-artifact.rknet.org/${CI_REPO_NAME}/
diff --git a/exampleSite/content/en/shortcodes/avatar/_index.md b/exampleSite/content/en/shortcodes/avatar/_index.md
new file mode 100644
index 0000000..6d9a3fc
--- /dev/null
+++ b/exampleSite/content/en/shortcodes/avatar/_index.md
@@ -0,0 +1,46 @@
+---
+title: Avatar
+resources:
+ - name: avatar
+ src: "avatar.jpg"
+ title: "Avatar"
+---
+
+The avatar shortcode is another custom image shortcode.
+
+
+
+## Usage
+
+Define a resource in the page front matter.
+
+
+
+```md
+---
+resources:
+ - name: avatar
+ src: "images/avatar.jpg"
+ title: "Avatar"
+---
+
+{{* avatar name="avatar" */>}}
+```
+
+
+
+## Attributes
+
+
+
+{{< propertylist name=shortcode-avatar sort=name order=asc >}}
+
+
+
+## Example
+
+
+
+{{< avatar name=avatar size="small" >}}
+
+
diff --git a/exampleSite/content/en/shortcodes/avatar/avatar.jpg b/exampleSite/content/en/shortcodes/avatar/avatar.jpg
new file mode 100644
index 0000000..d0fc747
Binary files /dev/null and b/exampleSite/content/en/shortcodes/avatar/avatar.jpg differ
diff --git a/exampleSite/content/en/shortcodes/buttons.md b/exampleSite/content/en/shortcodes/buttons.md
index 009d3f0..87ee07f 100644
--- a/exampleSite/content/en/shortcodes/buttons.md
+++ b/exampleSite/content/en/shortcodes/buttons.md
@@ -4,11 +4,20 @@ title: Buttons
Buttons are styled links that can lead to local page or external link.
-
+## Usage
+
+
```tpl
{{* button relref="/" [class="...", size="large|regular"] */>}}Get Home{{* /button */>}}
{{* button href="https://github.com/thegeeklab/hugo-geekdoc" */>}}Contribute{{* /button */>}}
```
+
+### Attributes
+
+
+
+{{< propertylist name=shortcode-buttons sort=name order=asc >}}
+
## Example
diff --git a/exampleSite/content/en/shortcodes/columns.md b/exampleSite/content/en/shortcodes/columns.md
index 8302266..9f3053c 100644
--- a/exampleSite/content/en/shortcodes/columns.md
+++ b/exampleSite/content/en/shortcodes/columns.md
@@ -4,12 +4,6 @@ title: Columns
The Columns shortcode can be used to organize content side-by-side (horizontally) for better readability.
-## Attributes
-
-| Name | Description | default |
-| --------------- | ------------------------------------------------ | ------- |
-| size (optional) | size of the first column (small\|regular\|large) | regular |
-
## Usage
```html
@@ -29,11 +23,19 @@ Dolor sit, sumo unique argument um no ...
{{* /columns */>}}
```
+### Attributes
+
+
+
+{{< propertylist name=shortcode-columns sort=name order=asc >}}
+
+
+
## Example
{{< columns >}}
-## Left
+### Left
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
@@ -42,14 +44,14 @@ copious quo ad. Stet probates in duo.
<--->
-## Mid Content
+### Mid Content
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.
<--->
-## Right Content
+### Right Content
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
diff --git a/exampleSite/content/en/shortcodes/expand.md b/exampleSite/content/en/shortcodes/expand.md
index 9dcd2fc..7330680 100644
--- a/exampleSite/content/en/shortcodes/expand.md
+++ b/exampleSite/content/en/shortcodes/expand.md
@@ -4,40 +4,38 @@ title: Expand
Expand shortcode can help to decrease clutter on screen by hiding part of text. Expand content by clicking on it.
-## Example
+## Usage
-### Default
-
-
```tpl
{{* expand */>}}
-## Markdown content
+### Markdown content
Dolor sit, sumo unique ...
{{* /expand */>}}
```
-
+
+It is also possible to use a custom label and symbol.
+
+
+
+```tpl
+{{* expand "Custom Label" "..." */>}}
+### More markdown
+Dolor sit, sumo unique ...
+{{* /expand */>}}
+```
+
+## Example
{{< expand >}}
-## Markdown content
+### Markdown content
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.
{{< /expand >}}
-### With Custom Label
-
-
-```tpl
-{{* expand "Custom Label" "..." */>}}
-## Markdown content
-Dolor sit, sumo unique ...
-{{* /expand */>}}
-```
-
-
{{< expand "Custom Label" "..." >}}
-## More markdown
+### More markdown
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
diff --git a/exampleSite/content/en/shortcodes/hints.md b/exampleSite/content/en/shortcodes/hints.md
index 51959a8..a4d728a 100644
--- a/exampleSite/content/en/shortcodes/hints.md
+++ b/exampleSite/content/en/shortcodes/hints.md
@@ -4,14 +4,6 @@ title: Hints
Hint shortcode can be used as hint/alerts/notification block.
-## Attributes
-
-| Name | Description | default |
-| ---------------- | -------------------------------------------------------------------------------- | --------- |
-| type | hint type | note |
-| icon (optional) | custom icon to use,need to be an icon from an [SVG sprite](/features/icon-sets/) | undefined |
-| title (optional) | hint title | undefined |
-
## Usage
@@ -24,6 +16,14 @@ Dolor sit, sumo unique argument um no. Gracie nominal id xiv. Romanesque acclima
```
+### Attributes
+
+
+
+{{< propertylist name=shortcode-hints sort=name order=asc >}}
+
+
+
## Example
{{< hint type=note >}}
diff --git a/exampleSite/content/en/shortcodes/icons.md b/exampleSite/content/en/shortcodes/icons.md
index 95c16d6..dfa3561 100644
--- a/exampleSite/content/en/shortcodes/icons.md
+++ b/exampleSite/content/en/shortcodes/icons.md
@@ -4,15 +4,17 @@ title: Icons
Simple shortcode to include icons from SVG sprites outside of menus.
+## Usage
+
```tpl
{{* icon "thumbs-up" */>}}
```
-## Usage
+## Example
-| Result | Usage |
+| Output | Code |
| -------------------------- | -------------------------------- |
| {{< icon "thumbs-up" >}} | `{{* icon "thumbs-up" */>}}` |
| {{< icon "thumbs-down" >}} | `{{* icon "thumbs-down" */>}}` |
diff --git a/exampleSite/content/en/shortcodes/images/_index.md b/exampleSite/content/en/shortcodes/images/_index.md
index 951c686..01ba84e 100644
--- a/exampleSite/content/en/shortcodes/images/_index.md
+++ b/exampleSite/content/en/shortcodes/images/_index.md
@@ -46,15 +46,6 @@ resources:
If you need more flexibility for your embedded images, you could use the `img` shortcode. It is using Hugo's
[page resources](https://gohugo.io/content-management/page-resources/) and supports lazy loading of your images.
-## Attributes
-
-| Name | Description | default |
-| ---- | ------------------------------------------------------------ | ----------------- |
-| name | name of the image resource defined in your front matter | empty |
-| alt | description for displayed image | resource `.Title` |
-| size | Thumbnail size (origin\|profile\|tiny\|small\|medium\|large) | empty |
-| lazy | enable or disable image lazy loading | true |
-
## Usage
Define your resources in the page front matter, custom parameter `params.credits` is optional.
@@ -74,6 +65,14 @@ resources:
{{* img name="forest-1" size="large" lazy=false */>}}
```
+### Attributes
+
+
+
+{{< propertylist name=shortcode-images sort=name order=asc >}}
+
+
+
## Example
diff --git a/exampleSite/content/en/shortcodes/includes.md b/exampleSite/content/en/shortcodes/includes.md
index 25ad079..de94631 100644
--- a/exampleSite/content/en/shortcodes/includes.md
+++ b/exampleSite/content/en/shortcodes/includes.md
@@ -2,28 +2,27 @@
title: Includes
---
-{{< toc >}}
-
Include shortcode can include files of different types. By specifying a language, the included file will have syntax highlighting.
+## Usage
+
```tpl
{{* include file="relative/path/from/hugo/root" language="go" */>}}
```
-Attributes:
+### Attributes
-| Name | Description | Default |
-| -------- | ----------------------------------------------------------------------------------------------------------------------------------- | -------------------------------- |
-| file | path to the included file relative to the Hugo root | undefined |
-| language | language for [syntax highlighting](https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages) | undefined |
-| type | special include type (`html,page`) | undefined (rendered as markdown) |
-| options | highlighting [options](https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode) | `linenos=table` |
+
+
+{{< propertylist name=shortcode-includes sort=name order=asc >}}
+
+
-## Examples
+## Example
-### Markdown file (default)
+### Example 1: Markdown file (default)
If no other options are specified, files will be rendered as Markdown using the `RenderString` [function](https://gohugo.io/functions/renderstring/).
@@ -43,7 +42,7 @@ If you include markdown files that should not get a menu entry, place them outsi
-### Language files
+### Example 2: Language files
This method can be used to include source code files and keep them automatically up to date.
@@ -60,9 +59,7 @@ Result:
-### Special include types
-
-#### HTML
+### Example 3: HTML
HTML content will be filtered by the `safeHTML` filter and added to the rendered page output.
@@ -73,9 +70,9 @@ HTML content will be filtered by the `safeHTML` filter and added to the rendered
{{< include file="/static/_includes/example.html.part" type="html" >}}
-#### Pages
+### Example 4: Hugo Pages
-In some situations, it can be helpful to include Markdown files that also contain shortcodes. While the [default method](#markdown-file-default) works fine to render plain Markdown, shortcodes are not parsed. The only way to get this to work is to use Hugo pages. There are several ways to structure these include pages, so whatever you do, keep in mind that Hugo needs to be able to render and serve these files as regular pages! How it works:
+In some situations, it can be helpful to include Markdown files that also contain shortcodes. While the [default method](#example-1-markdown-file-default) works fine to render plain Markdown, shortcodes are not parsed. The only way to get this to work is to use Hugo pages. There are several ways to structure these include pages, so whatever you do, keep in mind that Hugo needs to be able to render and serve these files as regular pages! How it works:
1. First you need to create a directory **within** your content directory. For this example site `_includes` is used.
2. To prevent the theme from embedding the page in the navigation, create a file `_includes/_index.md` and add `geekdocHidden: true` to the front matter.
diff --git a/exampleSite/content/en/shortcodes/katex.md b/exampleSite/content/en/shortcodes/katex.md
index 4306c63..d1ed300 100644
--- a/exampleSite/content/en/shortcodes/katex.md
+++ b/exampleSite/content/en/shortcodes/katex.md
@@ -4,7 +4,7 @@ title: KaTeX
[KaTeX](https://katex.org/) shortcode let you render math typesetting in markdown document.
-## Example
+## Usage
```latex
{{* katex [display] [class="text-center"] */>}}
@@ -12,6 +12,16 @@ f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
{{* /katex */>}}
```
+### Attributes
+
+
+
+{{< propertylist name=shortcode-katex sort=name order=asc >}}
+
+
+
+## Example
+
{{< katex display >}}
@@ -20,4 +30,4 @@ f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
-KaTeX can be used inline, for example {{< katex >}}\pi(x){{< /katex >}} or used with the `display` parameter (see above).
+KaTeX can be used inline, for example {{< katex >}}\pi(x){{< /katex >}} or used with the `display` parameter as above.
diff --git a/exampleSite/content/en/shortcodes/mermaid.md b/exampleSite/content/en/shortcodes/mermaid.md
index 6a644b8..0379ba8 100644
--- a/exampleSite/content/en/shortcodes/mermaid.md
+++ b/exampleSite/content/en/shortcodes/mermaid.md
@@ -4,7 +4,7 @@ title: Mermaid
[Mermaid](https://mermaidjs.github.io/) is library for generating SVG charts and diagrams from text.
-## Example
+## Usage
```tpl
@@ -22,6 +22,16 @@ sequenceDiagram
{{* /mermaid */>}}
```
+### Attributes
+
+
+
+{{< propertylist name=shortcode-mermaid sort=name order=asc >}}
+
+
+
+## Example
+
{{< mermaid class="text-center" >}}
diff --git a/exampleSite/content/en/shortcodes/progress.md b/exampleSite/content/en/shortcodes/progress.md
index 2a863e1..e0009cf 100644
--- a/exampleSite/content/en/shortcodes/progress.md
+++ b/exampleSite/content/en/shortcodes/progress.md
@@ -4,20 +4,19 @@ title: Progress
A progress bar shows how far a process has progressed.
-## Attributes
-
-| Name | Description | default |
-| ---------------- | -------------------------------------------------------------------------- | --------- |
-| value | progress value | 0 |
-| icon (optional) | icon to use, need to be an icon from an [SVG sprite](/features/icon-sets/) | undefined |
-| title (optional) | progress title | undefined |
-
## Usage
-
+
```tpl
{{* progress title=Eating value=65 icon=gdoc_heart */>}}
```
+
+### Attributes
+
+
+
+{{< propertylist name=shortcode-progress sort=name order=asc >}}
+
## Example
diff --git a/exampleSite/content/en/shortcodes/propertylist.md b/exampleSite/content/en/shortcodes/propertylist.md
index d00c13c..1718b3b 100644
--- a/exampleSite/content/en/shortcodes/propertylist.md
+++ b/exampleSite/content/en/shortcodes/propertylist.md
@@ -4,14 +4,6 @@ title: Properties
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`.
-## Attributes
-
-| Name | Description | default |
-| ---------------- | ------------------------------------------------------ | --------- |
-| name | name of the file from the `data/properties/` directory | undefined |
-| sort (optional) | field name to use for sorting | undefined |
-| order (optional) | sort order, only applied if `sort` is set | `asc` |
-
## Usage
@@ -28,6 +20,14 @@ The supported attributes can be taken from the following example:
+### Attributes
+
+
+
+{{< propertylist name=shortcode-buttons sort=name order=asc >}}
+
+
+
## Example
diff --git a/exampleSite/content/en/shortcodes/tabs.md b/exampleSite/content/en/shortcodes/tabs.md
index ed3a9cc..d0e768c 100644
--- a/exampleSite/content/en/shortcodes/tabs.md
+++ b/exampleSite/content/en/shortcodes/tabs.md
@@ -4,6 +4,8 @@ title: Tabs
Tabs let you organize content by context, for example installation instructions for each supported platform.
+## Usage
+
```tpl
{{* tabs "uniqueid" */>}}
diff --git a/exampleSite/content/en/shortcodes/toc-tree.md b/exampleSite/content/en/shortcodes/toc-tree.md
index 406452e..e0b4e25 100644
--- a/exampleSite/content/en/shortcodes/toc-tree.md
+++ b/exampleSite/content/en/shortcodes/toc-tree.md
@@ -4,12 +4,22 @@ title: ToC-Tree
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.
+## Usage
+
```tpl
-{{* toc-tree */>}}
+{{* toc-tree [sortBy="title"] */>}}
```
+### Attributes
+
+
+
+{{< propertylist name=shortcode-toc-tree sort=name order=asc >}}
+
+
+
## Example
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.
diff --git a/exampleSite/content/en/shortcodes/toc.md b/exampleSite/content/en/shortcodes/toc.md
index c1529a9..da8b7a3 100644
--- a/exampleSite/content/en/shortcodes/toc.md
+++ b/exampleSite/content/en/shortcodes/toc.md
@@ -4,21 +4,22 @@ title: ToC
Simple wrapper to generate a page Table of Content from a shortcode.
-**Attributes:**
+## Usage
-| Name | Description | Default |
-| ------ | -------------------------- | ------------------------------------------------------------- |
-| format | format of the returned ToC | html |
-
-**Usage:**
-
-
+
```tpl
{{* toc (format=[html|raw]) */>}}
```
+
+### Attributes
+
+
+
+{{< propertylist name=shortcode-toc sort=name order=asc >}}
+
-**Example:**
+## Example
{{< toc >}}
diff --git a/exampleSite/content/en/usage/configuration.md b/exampleSite/content/en/usage/configuration.md
index 4bfc570..ee0235e 100644
--- a/exampleSite/content/en/usage/configuration.md
+++ b/exampleSite/content/en/usage/configuration.md
@@ -26,7 +26,8 @@ enableRobotsTXT = true
[markup]
[markup.goldmark.renderer]
- # Needed for mermaid shortcode
+ # Needed for mermaid shortcode or when nesting shortcodes (e.g. img within
+ # columns or tabs)
unsafe = true
[markup.tableOfContents]
startLevel = 1
@@ -53,8 +54,7 @@ enableRobotsTXT = true
# per page if enabled. Can be enabled per page via 'geekdocCollapseSection'.
geekdocCollapseAllSections = true
- # (Optional, default true) Show page navigation links at the bottom of each
- # docs page (bundle menu only).
+ # (Optional, default true) Show page navigation links at the bottom of each docs page.
geekdocNextPrev = false
# (Optional, default true) Show a breadcrumb navigation bar at the top of each docs page.
@@ -97,7 +97,7 @@ enableRobotsTXT = true
# by the 'img' shortcode.
geekdocImageLazyLoading = true
- # (Optional, default false) Set HTMl