diff --git a/exampleSite/archetypes/chapter-overview.md b/exampleSite/archetypes/chapter-overview.md new file mode 100644 index 0000000000..20619b8ea1 --- /dev/null +++ b/exampleSite/archetypes/chapter-overview.md @@ -0,0 +1,7 @@ ++++ +title = "{{ replace .Name "-" " " | title }}" +type = "chapter-overview" +weight = 1 ++++ + +This is a new chapter. \ No newline at end of file diff --git a/exampleSite/content/shortcodes/_index.en.md b/exampleSite/content/shortcodes/_index.en.md index 21530522e7..77c6a867e9 100644 --- a/exampleSite/content/shortcodes/_index.en.md +++ b/exampleSite/content/shortcodes/_index.en.md @@ -1,7 +1,7 @@ +++ ordersectionsby = "title" title = "Shortcodes" -type = "chapter" +type = "chapter-overview" weight = 3 +++ @@ -12,5 +12,3 @@ But this happens to be a bad idea. Everyone uses Markdown because it's pure and To avoid this limitations, Hugo created [shortcodes](https://gohugo.io/extras/shortcodes/). A shortcode is a simple snippet inside a page. The Relearn theme provides multiple shortcodes on top of existing ones. - -{{%children containerstyle="div" style="h2" description="true" %}} diff --git a/exampleSite/layouts/chapter-overview/views/article.html b/exampleSite/layouts/chapter-overview/views/article.html new file mode 100644 index 0000000000..35fc6fd8c2 --- /dev/null +++ b/exampleSite/layouts/chapter-overview/views/article.html @@ -0,0 +1,19 @@ + +
+
+ {{- partial "content-header.html" . }} +
+{{ partial "heading-pre.html" . }}
{{ T "Chapter" .Params.Weight }}
+{{ partial "heading.html" . }}{{ partial "heading-post.html" . }} + +{{ partial "article-content.html" . }} +{{ partial "shortcodes/children.html" (dict + "page" . + "containerstyle" "div" + "style" "h2" + "description" "true" +)}} + +
\ No newline at end of file diff --git a/exampleSite/layouts/partials/menu-pre.html b/exampleSite/layouts/partials/menu-pre.html index eb58e01454..f5ee48b900 100644 --- a/exampleSite/layouts/partials/menu-pre.html +++ b/exampleSite/layouts/partials/menu-pre.html @@ -1 +1 @@ -{{ if (eq .Type "chapter") }}{{ .Params.weight }}. {{ end }} \ No newline at end of file +{{ if (or (eq .Type "chapter") (eq .Type "chapter-overview")) }}{{ .Params.weight }}. {{ end }} \ No newline at end of file