summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-28 16:30:22 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-28 16:30:22 +0200
commit7a76469d3a001aa63289f9698ffc784a4c1926ed (patch)
tree11c80648eb165eae02f8cf4516cf26855dddbc0a
parent914c82e7f1715a9707cfd49aa6f3f2e7e1ea05c8 (diff)
downloadgohugo-theme-ed-7a76469d3a001aa63289f9698ffc784a4c1926ed.tar.gz
Add `{{< mini-toc >}}` shortcode
-rw-r--r--CHANGELOG.md1
-rw-r--r--exampleSite/content/about.md4
-rw-r--r--layouts/shortcodes/mini-toc.html1
3 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c674c69..a5eaa3b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add multilanguage support
- Add Russian translation
- Provide an ability to use hreflang attribute in raw links
+- Add `{{< mini-toc >}}` shortcode
### Changed
diff --git a/exampleSite/content/about.md b/exampleSite/content/about.md
index b8fa060..1142466 100644
--- a/exampleSite/content/about.md
+++ b/exampleSite/content/about.md
@@ -54,3 +54,7 @@ for you, Kindle!
To learn how to install and begin using Ed, please visit our
[documentation page]({{< relref "/documentation" >}} "Visit the documentation").
+
+---
+
+{{< mini-toc >}}
diff --git a/layouts/shortcodes/mini-toc.html b/layouts/shortcodes/mini-toc.html
new file mode 100644
index 0000000..88ce192
--- /dev/null
+++ b/layouts/shortcodes/mini-toc.html
@@ -0,0 +1 @@
+{{- partial "mini-toc" . -}}