From 7cebfdb627626e5294610282e47497875097c675 Mon Sep 17 00:00:00 2001
From: Eric Park <me@ericswpark.com>
Date: Mon, 29 Mar 2021 19:38:33 +0000
Subject: [PATCH] Allow users to re-define post section name (#172)

---
 layouts/_default/single.html |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 85ef408..0b89a90 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -6,7 +6,7 @@
             {{ end }}
             <div class="post-title">
                 <h3>{{ .Title }}</h3>
-                {{ if eq .Type "post"}}
+                {{ if or (eq .Type "post") (eq .Type .Site.Params.postSectionName) }}
                     <div class="info">
                         <em class="fas fa-calendar-day"></em>
                         <span class="date">{{ if isset .Site.Params "singledateformat" }} 
@@ -33,7 +33,7 @@
             </div>
         </div>
 
-        {{ if and (eq .Type "post") (ne .Page.Params.disableComments true) }}
+        {{ if and (or (eq .Type "post") (eq .Type .Site.Params.postSectionName)) (ne .Page.Params.disableComments true) }}
             {{- if .Site.DisqusShortname -}}
                 <div id="fb_comments_container">
                     <h2>{{ i18n "comments" }}</h2>

--
Gitblit v1.10.0