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

github.com/curttimson/hugo-theme-dopetrope.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis Timson <curt@live.co.uk>2018-02-19 00:11:39 +0300
committerGitHub <noreply@github.com>2018-02-19 00:11:39 +0300
commit3c3c60ef6d0e83e11265d44457fd815ba7594d9e (patch)
treee69f5945c373fd54d511e24b1d54d15698deaaf4
parent796c7cbf7c7fa0a999279329bab4b5e8765b2ac3 (diff)
parent07572972a65c7ee324e6168a5a073da993c23abd (diff)
Merge pull request #30 from curttimson/feature/no-sidebar-option3.2.0
Feature/no sidebar option
-rw-r--r--README.md13
-rw-r--r--exampleSite/content/blog/04-no-sidebar.md19
-rw-r--r--exampleSite/content/blog/04-post.md12
-rw-r--r--exampleSite/content/blog/06-comments.md (renamed from exampleSite/content/blog/06-post.md)8
-rw-r--r--layouts/_default/single.html2
-rw-r--r--package.json2
6 files changed, 38 insertions, 18 deletions
diff --git a/README.md b/README.md
index 1a03c13..5487314 100644
--- a/README.md
+++ b/README.md
@@ -21,6 +21,19 @@ See the demo's configuration as an example:
https://github.com/curttimson/hugo-theme-dopetrope/blob/master/exampleSite/config-prod.toml
+### Front Matter
+
+ - `description`
+ - `date`
+ - `thumbnail`
+ - `image`
+ - `title`
+ - `slug`
+ - `author`
+ - `draft`
+ - `disqusid` - See [Blog Comments](#blog-comments)
+ - `hidesidebar` - Set to false to hide the sidebar on specific pages
+
### Blog Comments
Blog comments are supported by Disqus. Once set up comments will be displayed on the blog posts as well as a count on the homepage.
diff --git a/exampleSite/content/blog/04-no-sidebar.md b/exampleSite/content/blog/04-no-sidebar.md
new file mode 100644
index 0000000..ca7ed12
--- /dev/null
+++ b/exampleSite/content/blog/04-no-sidebar.md
@@ -0,0 +1,19 @@
++++
+description = "An example of a post without a sidebar"
+date = "2017-12-25T00:00:00"
+thumbnail = "images/pic08.jpg"
+image = "images/pic01.jpg"
+title = "No Sidebar"
+slug = "no-sidebar"
+author = "John Smith"
+draft = false
+disqusid = "4"
+hidesidebar = true
++++
+An example of a post without a sidebar.
+
+```
++++
+hidesidebar = true
++++
+``` \ No newline at end of file
diff --git a/exampleSite/content/blog/04-post.md b/exampleSite/content/blog/04-post.md
deleted file mode 100644
index dc3eb11..0000000
--- a/exampleSite/content/blog/04-post.md
+++ /dev/null
@@ -1,12 +0,0 @@
-+++
-description = "fourth post description"
-date = "2017-12-25T00:00:00"
-thumbnail = "images/pic08.jpg"
-image = "images/pic01.jpg"
-title = "fourth post"
-slug = "fourth-post"
-author = "John Smith"
-draft = false
-disqusid = "4"
-+++
-Testing content \ No newline at end of file
diff --git a/exampleSite/content/blog/06-post.md b/exampleSite/content/blog/06-comments.md
index 3231657..6fa3771 100644
--- a/exampleSite/content/blog/06-post.md
+++ b/exampleSite/content/blog/06-comments.md
@@ -1,12 +1,12 @@
+++
-description = "Sixth post description"
+description = "Example of a post with comments"
date = "2018-02-06T00:00:00"
thumbnail = "images/pic08.jpg"
image = "images/pic01.jpg"
-title = "Sixth post"
-slug = "sixth-post"
+title = "Comment Example"
+slug = "comment-example"
author = "John Smith"
draft = false
disqusid = "6"
+++
-Testing content \ No newline at end of file
+Example of a post with comments using Disqus. \ No newline at end of file
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 75a9e4e..b4df0e0 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -23,7 +23,7 @@
<!-- Main -->
<div id="main-wrapper">
<div class="container">
- {{ if or (eq .Site.Params.Sidebar.position "left") (eq .Site.Params.Sidebar.position "right") }}
+ {{ if and (or (eq .Site.Params.Sidebar.position "left") (eq .Site.Params.Sidebar.position "right")) (not (eq .Params.hidesidebar true)) }}
<div class="row">
{{ if eq .Site.Params.Sidebar.position "left" }}
<div class="4u 12u(mobile)">
diff --git a/package.json b/package.json
index 7337bd8..bcb26ba 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hugo-theme-dopetrope",
- "version": "3.1.0",
+ "version": "3.2.0",
"description": "Hugo Theme Dopetrope",
"main": "index.js",
"scripts": {