diff options
13 files changed, 17 insertions, 8 deletions
diff --git a/archetypes/default.md b/archetypes/default.md index dd9d794..4df35dc 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -2,7 +2,8 @@ title= "{{ replace .TranslationBaseName "-" " " | title }}" date= {{ .Date }} description = "" -draft= true +draft = true +subpage = false +++ Lorem Ipsum. diff --git a/exampleSite/content/content-organisation/customize-style/colors/_index.md b/exampleSite/content/content-organisation/customize-style/colors/_index.md index 33eb058..9acf7f2 100644 --- a/exampleSite/content/content-organisation/customize-style/colors/_index.md +++ b/exampleSite/content/content-organisation/customize-style/colors/_index.md @@ -1,6 +1,6 @@ +++ title="Colors" -tab=true +subpage=true +++ diff --git a/exampleSite/content/content-organisation/customize-style/disable/_index.md b/exampleSite/content/content-organisation/customize-style/disable/_index.md index 4cf772b..8b16b12 100644 --- a/exampleSite/content/content-organisation/customize-style/disable/_index.md +++ b/exampleSite/content/content-organisation/customize-style/disable/_index.md @@ -1,6 +1,6 @@ +++ title = "Disable features" -tab=true +subpage=true +++ You can disable feature in docport by changing some params in `config.toml` diff --git a/exampleSite/content/content-organisation/placeholders/header/_index.md b/exampleSite/content/content-organisation/placeholders/header/_index.md index 693591f..5e1c2ce 100644 --- a/exampleSite/content/content-organisation/placeholders/header/_index.md +++ b/exampleSite/content/content-organisation/placeholders/header/_index.md @@ -2,6 +2,7 @@ title = "Header" description = "" weight = 10 +subpage = true +++ diff --git a/exampleSite/content/content-organisation/placeholders/menu/_index.md b/exampleSite/content/content-organisation/placeholders/menu/_index.md index 6d09ec6..fd6bb63 100644 --- a/exampleSite/content/content-organisation/placeholders/menu/_index.md +++ b/exampleSite/content/content-organisation/placeholders/menu/_index.md @@ -2,6 +2,7 @@ title = "Menu" description = "" weight = 20 +subpage = true +++ diff --git a/exampleSite/content/content-organisation/placeholders/thefooter/_index.md b/exampleSite/content/content-organisation/placeholders/thefooter/_index.md index ea8df24..49f828a 100644 --- a/exampleSite/content/content-organisation/placeholders/thefooter/_index.md +++ b/exampleSite/content/content-organisation/placeholders/thefooter/_index.md @@ -2,6 +2,7 @@ title = "Footer" description = "" weight = 100 +subpage = true +++ diff --git a/exampleSite/content/content-organisation/placeholders/toc/_index.md b/exampleSite/content/content-organisation/placeholders/toc/_index.md index fc5e74f..6c35e95 100644 --- a/exampleSite/content/content-organisation/placeholders/toc/_index.md +++ b/exampleSite/content/content-organisation/placeholders/toc/_index.md @@ -2,6 +2,7 @@ title = "Table of content" description = "" weight = 50 +subpage = true +++ diff --git a/exampleSite/content/create-page/control-page-menu/_index.md b/exampleSite/content/create-page/control-page-menu/_index.md index 714698e..384adc3 100644 --- a/exampleSite/content/create-page/control-page-menu/_index.md +++ b/exampleSite/content/create-page/control-page-menu/_index.md @@ -2,6 +2,7 @@ title="Navigation appearance" pre = "👻 " post = " 👋" +subpage = true +++ Each page is displayed on navigation bars diff --git a/exampleSite/content/create-page/page-images/_index.md b/exampleSite/content/create-page/page-images/_index.md index 28ddaa5..6ea26c1 100644 --- a/exampleSite/content/create-page/page-images/_index.md +++ b/exampleSite/content/create-page/page-images/_index.md @@ -3,6 +3,7 @@ title = "With images" date = "2017-04-24T18:36:24+02:00" weight = 10 hidden = false +subpage = true +++ Images have a similar syntax to links but include a preceding exclamation point. diff --git a/exampleSite/content/create-page/page-slide/_index.md b/exampleSite/content/create-page/page-slide/_index.md index a874a09..1bf47d0 100644 --- a/exampleSite/content/create-page/page-slide/_index.md +++ b/exampleSite/content/create-page/page-slide/_index.md @@ -3,6 +3,7 @@ title = "As a SlideDeck" description = "" date = "2017-04-24T18:36:24+02:00" weight = 90 +subpage = true +++ A basic md content page can be rendered as a reveal.js presentation full screen. diff --git a/exampleSite/content/docport-theme/credits/_index.md b/exampleSite/content/docport-theme/credits/_index.md index 3e85d25..6737865 100644 --- a/exampleSite/content/docport-theme/credits/_index.md +++ b/exampleSite/content/docport-theme/credits/_index.md @@ -1,6 +1,7 @@ +++ title = "Credits" description = "Contributors and packages used by hugo-theme-docport" +subpage = true +++ diff --git a/layouts/partials/_menu.html b/layouts/partials/_menu.html index 7a477e8..99606b7 100644 --- a/layouts/partials/_menu.html +++ b/layouts/partials/_menu.html @@ -21,7 +21,7 @@ {{- with .sect}} {{- if and .IsSection (or (not .Params.hidden) $.showhidden)}} {{- $numberOfPages := (len .Sections) }} - {{- $numberOfPages := (len (where .Sections "Params.tab" "ne" "true")) }} + {{- $numberOfPages := (len (where .Sections "Params.subpage" "ne" "true")) }} {{- safeHTML .Params.head}} <li data-nav-id="{{.Permalink}}" class="dd-item {{- if .IsAncestor $currentNode}} parent{{end}} @@ -71,7 +71,7 @@ {{- range $pages.ByWeight }} {{- if and .Params.hidden (not $.showhidden) }} {{- else}} - {{ if and (eq .Kind "section") (not .Params.tab ) }} + {{ if and (eq .Kind "section") (not .Params.subpage ) }} {{- template "section-tree-nav" dict "sect" . "currentnode" $currentNode "level" (add $level 1)}} diff --git a/layouts/partials/body-article-content.html b/layouts/partials/body-article-content.html index de0ab66..9df16e3 100644 --- a/layouts/partials/body-article-content.html +++ b/layouts/partials/body-article-content.html @@ -16,8 +16,8 @@ {{ $cPage := .}}
{{ $elements := (where .Sections "NONONO" false) }}
- {{ $isSubPage := .Params.tab }}
- {{ $subpages := (where (where (where .Sections.ByWeight "Params.tab" true) "Params.hidden" "ne" true ) "Kind" "section")}}
+ {{ $isSubPage := .Params.subpage }}
+ {{ $subpages := (where (where (where .Sections.ByWeight "Params.subpage" true) "Params.hidden" "ne" true ) "Kind" "section")}}
{{ $pages := (where (where .CurrentSection.Pages.ByWeight "Kind" "page") "Params.hidden" "ne" true ) }}
{{if $isSubPage }}
@@ -29,7 +29,7 @@ {{if gt (len $subpages) 0}} <!-- section has subpage -->
{{ $elements = $subpages }}
{{else if $isSubPage }} <!-- Section is subpage -->
- {{ $elements = (where (where .Parent.Sections.ByWeight "Params.tab" true) "Params.hidden" "ne" true ) }}
+ {{ $elements = (where (where .Parent.Sections.ByWeight "Params.subpage" true) "Params.hidden" "ne" true ) }}
{{else if gt (len $pages) 0}} <!-- Section has pages -->
{{ $elements = $pages }}
{{else}}
|