diff --git a/wowchemy/layouts/partials/book_layout.html b/wowchemy/layouts/partials/book_layout.html index 280a58bc..1224a735 100644 --- a/wowchemy/layouts/partials/book_layout.html +++ b/wowchemy/layouts/partials/book_layout.html @@ -1,8 +1,7 @@ {{ $current_page := . }} {{/* Check whether to show breadcrumb navigation. */}} -{{ $breadcrumb_page_types := site.Params.breadcrumb.page_types | default dict }} -{{ $show_breadcrumb := index $breadcrumb_page_types .Type | default false }} +{{ $show_breadcrumb := .Params.show_breadcrumb }}
diff --git a/wowchemy/layouts/partials/page_edit.html b/wowchemy/layouts/partials/page_edit.html index caa34d79..61dbe3e6 100644 --- a/wowchemy/layouts/partials/page_edit.html +++ b/wowchemy/layouts/partials/page_edit.html @@ -1,6 +1,5 @@ -{{/* This makes `edit_page` optional in `params.toml` and prevents errors if it's removed. */}} -{{ if site.Params.edit_page }} -{{ if site.Params.edit_page.repo_url | and (index site.Params.edit_page.editable .Type) | and (ne .Params.editable false) | or .Params.editable }} +{{/* Add link to let visitors edit the page on GitHub. */}} +{{ if .Params.editable | and site.Params.edit_page.repo_url }} {{/* Get language subfolder for multilingual sites. */}} {{/* Limitations: the subfolder param, `.contentDir`, is unexposed in the Hugo `site` API so we attempt to workaround this issue. */}} {{ $content_dir := "content" }} @@ -16,4 +15,3 @@

{{ end }} -{{ end }} diff --git a/wowchemy/layouts/partials/page_related.html b/wowchemy/layouts/partials/page_related.html index 504235ad..13e35c32 100644 --- a/wowchemy/layouts/partials/page_related.html +++ b/wowchemy/layouts/partials/page_related.html @@ -1,6 +1,5 @@ -{{/* This makes `show_related` optional in `params.toml` and prevents errors if it's removed. */}} -{{ if site.Params.show_related }} -{{ if (index site.Params.show_related .Type) | and (ne .Params.show_related false) | or .Params.show_related }} +{{/* Show related/recommended content. */}} +{{ if .Params.show_related }} {{ $related := site.RegularPages.Related . | first 5 }} {{ with $related }}
@@ -13,4 +12,3 @@
{{ end }} {{ end }} -{{ end }}