Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/themefisher/bigspring-hugo-startup-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt6697 <32440697+matt6697@users.noreply.github.com>2021-09-13 20:02:35 +0300
committermatt6697 <32440697+matt6697@users.noreply.github.com>2021-09-13 20:02:35 +0300
commite6e2245377368149eb2924393b12499684d4e21f (patch)
tree56231e79d05b0723f3a4cbf9fe74451d15e21f82
parent43ae6c2b9be9fc4b3272971b8cb17cd1b15b4953 (diff)
Make blog page style usable for custom page type
Make blog page style usable for other sections than "post", "blog", "categories", or "tags" by making a blog type configurable
-rw-r--r--exampleSite/config/_default/params.toml3
-rw-r--r--layouts/_default/list.html2
2 files changed, 4 insertions, 1 deletions
diff --git a/exampleSite/config/_default/params.toml b/exampleSite/config/_default/params.toml
index 9858d83..22b235f 100644
--- a/exampleSite/config/_default/params.toml
+++ b/exampleSite/config/_default/params.toml
@@ -8,6 +8,9 @@ image = "images/logo.png" # this image will be used as fallback if a page has no
# contact form action
contact_form_action = "#" # contact form works with https://formspree.io
+# Type of pages to be rendered with a blog view
+blogCategoryType = "category"
+
# Preloader
[preloader]
enable = false
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 6f4f283..2da07b8 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -3,7 +3,7 @@
{{ partial "page-header.html" . }}
<!-- checking blog -->
-{{ if or (or (eq .Section "post") (eq .Section "blog")) (or (eq .Section "categories") (eq .Section "tags") )}}
+{{ if or (or (eq .Section "post") (eq .Section "blog") (eq .Type site.Params.blogCategoryType)) (or (eq .Section "categories") (eq .Section "tags") )}}
<section class="section">
<div class="container">