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

github.com/curttimson/hugo-theme-massively.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis Timson <curt@live.co.uk>2018-07-10 15:26:46 +0300
committerGitHub <noreply@github.com>2018-07-10 15:26:46 +0300
commit12f980a257f81554bc2d82fbcb2367acbbb4b145 (patch)
tree056a9ddb97bf3a38c998235d3a0a9fc650956378
parent7cb6b2b87d85b5e1b7387de5a86b0223cc0bb6be (diff)
Disable comments on specific posts (#47)
* Disable comments on post if disableComments = true * Disable comments on all but the comments example post * Update README to include disableComments front matter
-rw-r--r--README.md3
-rw-r--r--exampleSite/content/post/post.1.en.md1
-rw-r--r--exampleSite/content/post/post.1.es.md1
-rw-r--r--exampleSite/content/post/post.2.en.md1
-rw-r--r--exampleSite/content/post/post.2.es.md1
-rw-r--r--exampleSite/content/post/post.3.en.md1
-rw-r--r--exampleSite/content/post/post.3.es.md1
-rw-r--r--exampleSite/content/post/post.4.en.md1
-rw-r--r--exampleSite/content/post/post.4.es.md1
-rw-r--r--exampleSite/content/post/post.5.en.md1
-rw-r--r--exampleSite/content/post/post.5.es.md1
-rw-r--r--exampleSite/content/post/post.6.en.md1
-rw-r--r--exampleSite/content/post/post.6.es.md1
-rw-r--r--exampleSite/content/post/post.7.en.md1
-rw-r--r--exampleSite/content/post/post.7.es.md1
-rw-r--r--exampleSite/content/post/post.8.en.md1
-rw-r--r--exampleSite/content/post/post.8.es.md1
-rw-r--r--exampleSite/content/post/post.en.md1
-rw-r--r--exampleSite/content/post/post.es.md1
-rw-r--r--layouts/_default/single.html2
-rw-r--r--package-lock.json2
-rw-r--r--package.json2
22 files changed, 25 insertions, 2 deletions
diff --git a/README.md b/README.md
index 186515d..b5ef9d5 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,9 @@ The cover image URL is hard-coded, therefore to replace this add an image to the
- [Simplified Chinese](https://github.com/curttimson/hugo-theme-massively/blob/master/i18n/zh.toml)
- [Spanish](https://github.com/curttimson/hugo-theme-massively/blob/master/i18n/es.toml)
+## Custom Front Matter
+
+ - `disableComments` - If set to `true` this will disable comments on the post when Disqus is enabled.
## Development
diff --git a/exampleSite/content/post/post.1.en.md b/exampleSite/content/post/post.1.en.md
index 0a70435..3822143 100644
--- a/exampleSite/content/post/post.1.en.md
+++ b/exampleSite/content/post/post.1.en.md
@@ -4,4 +4,5 @@ slug = 'post1'
image = 'images/pic03.jpg'
date = "2017-04-22T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++ \ No newline at end of file
diff --git a/exampleSite/content/post/post.1.es.md b/exampleSite/content/post/post.1.es.md
index 99591e5..611f9bd 100644
--- a/exampleSite/content/post/post.1.es.md
+++ b/exampleSite/content/post/post.1.es.md
@@ -4,4 +4,5 @@ slug = 'post1'
image = 'images/pic03.jpg'
date = "2017-04-22T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++
diff --git a/exampleSite/content/post/post.2.en.md b/exampleSite/content/post/post.2.en.md
index a3c9972..e6a0cd1 100644
--- a/exampleSite/content/post/post.2.en.md
+++ b/exampleSite/content/post/post.2.en.md
@@ -4,4 +4,5 @@ slug = 'post2'
image = 'images/pic04.jpg'
date = "2017-04-18T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++ \ No newline at end of file
diff --git a/exampleSite/content/post/post.2.es.md b/exampleSite/content/post/post.2.es.md
index fda80b1..6c5ae56 100644
--- a/exampleSite/content/post/post.2.es.md
+++ b/exampleSite/content/post/post.2.es.md
@@ -4,4 +4,5 @@ slug = 'post2'
image = 'images/pic04.jpg'
date = "2017-04-18T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++
diff --git a/exampleSite/content/post/post.3.en.md b/exampleSite/content/post/post.3.en.md
index b38eda0..9a7799e 100644
--- a/exampleSite/content/post/post.3.en.md
+++ b/exampleSite/content/post/post.3.en.md
@@ -4,4 +4,5 @@ slug = 'post3'
image = 'images/pic07.jpg'
date = "2017-04-07T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++ \ No newline at end of file
diff --git a/exampleSite/content/post/post.3.es.md b/exampleSite/content/post/post.3.es.md
index 9c3b9d0..efb5b7e 100644
--- a/exampleSite/content/post/post.3.es.md
+++ b/exampleSite/content/post/post.3.es.md
@@ -4,4 +4,5 @@ slug = 'post3'
image = 'images/pic07.jpg'
date = "2017-04-07T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++
diff --git a/exampleSite/content/post/post.4.en.md b/exampleSite/content/post/post.4.en.md
index 61c90e8..1ff837f 100644
--- a/exampleSite/content/post/post.4.en.md
+++ b/exampleSite/content/post/post.4.en.md
@@ -4,6 +4,7 @@ slug = 'post4'
image = 'images/pic06.jpg'
date = "2017-04-11T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam sit amet dui nec dui commodo auctor non eu mauris. Duis varius finibus vestibulum. Praesent aliquam, erat sed dictum feugiat, velit erat iaculis elit, eget iaculis ex libero ac sapien. Sed maximus ut lectus et varius. Nullam posuere velit vitae est consectetur porttitor. Vestibulum tempor felis ante, nec volutpat risus vestibulum ac. Mauris at finibus felis, eu placerat arcu. Sed nec semper nunc. Proin eget mollis felis. Donec fermentum lectus non metus elementum, dignissim ornare felis congue. In rhoncus vehicula nibh, ac imperdiet dolor tincidunt sit amet.
diff --git a/exampleSite/content/post/post.4.es.md b/exampleSite/content/post/post.4.es.md
index 9f9b580..2de2cf1 100644
--- a/exampleSite/content/post/post.4.es.md
+++ b/exampleSite/content/post/post.4.es.md
@@ -4,6 +4,7 @@ slug = 'post4'
image = 'images/pic06.jpg'
date = "2017-04-11T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam sit amet dui nec dui commodo auctor non eu mauris. Duis varius finibus vestibulum. Praesent aliquam, erat sed dictum feugiat, velit erat iaculis elit, eget iaculis ex libero ac sapien. Sed maximus ut lectus et varius. Nullam posuere velit vitae est consectetur porttitor. Vestibulum tempor felis ante, nec volutpat risus vestibulum ac. Mauris at finibus felis, eu placerat arcu. Sed nec semper nunc. Proin eget mollis felis. Donec fermentum lectus non metus elementum, dignissim ornare felis congue. In rhoncus vehicula nibh, ac imperdiet dolor tincidunt sit amet.
diff --git a/exampleSite/content/post/post.5.en.md b/exampleSite/content/post/post.5.en.md
index 0b64882..22ad998 100644
--- a/exampleSite/content/post/post.5.en.md
+++ b/exampleSite/content/post/post.5.en.md
@@ -4,4 +4,5 @@ slug = 'post5'
image = 'images/pic05.jpg'
date = "2017-04-14T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++ \ No newline at end of file
diff --git a/exampleSite/content/post/post.5.es.md b/exampleSite/content/post/post.5.es.md
index 15cf9cd..4357a04 100644
--- a/exampleSite/content/post/post.5.es.md
+++ b/exampleSite/content/post/post.5.es.md
@@ -4,4 +4,5 @@ slug = 'post5'
image = 'images/pic05.jpg'
date = "2017-04-14T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++
diff --git a/exampleSite/content/post/post.6.en.md b/exampleSite/content/post/post.6.en.md
index 20847e5..324afd2 100644
--- a/exampleSite/content/post/post.6.en.md
+++ b/exampleSite/content/post/post.6.en.md
@@ -4,4 +4,5 @@ slug = 'post6'
image = 'images/pic03.jpg'
date = "2017-03-22T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++ \ No newline at end of file
diff --git a/exampleSite/content/post/post.6.es.md b/exampleSite/content/post/post.6.es.md
index e8b37f8..2f20316 100644
--- a/exampleSite/content/post/post.6.es.md
+++ b/exampleSite/content/post/post.6.es.md
@@ -4,4 +4,5 @@ slug = 'post6'
image = 'images/pic03.jpg'
date = "2017-03-22T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++
diff --git a/exampleSite/content/post/post.7.en.md b/exampleSite/content/post/post.7.en.md
index 982860a..7a96415 100644
--- a/exampleSite/content/post/post.7.en.md
+++ b/exampleSite/content/post/post.7.en.md
@@ -4,4 +4,5 @@ slug = 'post7'
image = 'images/pic04.jpg'
date = "2017-03-18T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++ \ No newline at end of file
diff --git a/exampleSite/content/post/post.7.es.md b/exampleSite/content/post/post.7.es.md
index 05723d0..e5e8a81 100644
--- a/exampleSite/content/post/post.7.es.md
+++ b/exampleSite/content/post/post.7.es.md
@@ -4,4 +4,5 @@ slug = 'post7'
image = 'images/pic04.jpg'
date = "2017-03-18T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++
diff --git a/exampleSite/content/post/post.8.en.md b/exampleSite/content/post/post.8.en.md
index 06b1047..b0e0a73 100644
--- a/exampleSite/content/post/post.8.en.md
+++ b/exampleSite/content/post/post.8.en.md
@@ -4,4 +4,5 @@ slug = 'post8'
image = 'images/pic07.jpg'
date = "2017-03-07T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++ \ No newline at end of file
diff --git a/exampleSite/content/post/post.8.es.md b/exampleSite/content/post/post.8.es.md
index 8783fe3..798d94e 100644
--- a/exampleSite/content/post/post.8.es.md
+++ b/exampleSite/content/post/post.8.es.md
@@ -4,4 +4,5 @@ slug = 'post8'
image = 'images/pic07.jpg'
date = "2017-03-07T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++
diff --git a/exampleSite/content/post/post.en.md b/exampleSite/content/post/post.en.md
index 50647d8..d6b96f3 100644
--- a/exampleSite/content/post/post.en.md
+++ b/exampleSite/content/post/post.en.md
@@ -4,4 +4,5 @@ slug = 'post'
image = 'images/pic02.jpg'
date = "2012-02-06T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++ \ No newline at end of file
diff --git a/exampleSite/content/post/post.es.md b/exampleSite/content/post/post.es.md
index ae0708e..84d6249 100644
--- a/exampleSite/content/post/post.es.md
+++ b/exampleSite/content/post/post.es.md
@@ -4,4 +4,5 @@ slug = 'post'
image = 'images/pic02.jpg'
date = "2012-02-06T00:00:00"
description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disableComments = true
+++
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index c52e501..991bcff 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -26,7 +26,9 @@
{{ partial "postcustom" . }}
+ {{ if not (eq .Params.disableComments true) }}
{{ template "_internal/disqus.html" . }}
+ {{ end }}
</section>
</div>
diff --git a/package-lock.json b/package-lock.json
index 2e1f244..7cd258d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,5 +1,5 @@
{
"name": "hugo-theme-massively",
- "version": "4.0.0",
+ "version": "4.1.0",
"lockfileVersion": 1
}
diff --git a/package.json b/package.json
index 5e3355c..99cc7cb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hugo-theme-massively",
- "version": "4.0.0",
+ "version": "4.1.0",
"description": "HTML5 UP theme Massively for Hugo",
"main": "index.js",
"scripts": {