diff options
author | dudil <4785835+dudil@users.noreply.github.com> | 2018-01-31 03:45:37 +0300 |
---|---|---|
committer | Patrick Collins <thepatrickcollins@gmail.com> | 2018-01-31 03:45:37 +0300 |
commit | b4bd0f35f0431429c9f108542a368274b68b23f4 (patch) | |
tree | 0823c8d153b19c7040e85ac88c6b3ef914553679 | |
parent | d59f56ac6682b3ed690e67cffdc755141986efd1 (diff) |
Add configuration to show / hide the categories section in the sidebar (#109)
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | layouts/partials/sidebar.html | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index ff3528c..faee664 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -27,6 +27,8 @@ pluralizeListTitles = false socialAppearAtBottom = true # Sets Categories to sort by number of posts instead of alphabetical categoriesByCount = true + # set to show or to hide categories in the sidebar + showSidebarCategories = true # Sets Estimated Reading Time to appear in post headers includeReadingTime = true # Sets the Favicon and Version for the site. Default support is for diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index f946b01..38c8801 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -76,6 +76,7 @@ <!-- This if statement only applies if someone goes to the /categories url --> <!-- Otherwise this section is shown for all other links --> + {{ if .Site.Params.showSidebarCategories }} {{ if ne ($.Scratch.Get "showCategories") false }} <!-- Categories List --> <section id="categories"> @@ -107,6 +108,7 @@ {{ end }} </section> {{ end }} + {{ end }} <!-- About --> {{ with .Site.Params.intro.about }} |