From 0e6f05bf2f738196eb738c256b7cee2b22363df0 Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sun, 18 Feb 2018 21:00:34 +0000 Subject: :sparkles: Add ability to hide sidebar for specific posts --- exampleSite/content/blog/04-no-sidebar.md | 19 +++++++++++++++++++ exampleSite/content/blog/04-post.md | 12 ------------ exampleSite/content/blog/06-comments.md | 12 ++++++++++++ exampleSite/content/blog/06-post.md | 12 ------------ layouts/_default/single.html | 2 +- package.json | 2 +- 6 files changed, 33 insertions(+), 26 deletions(-) create mode 100644 exampleSite/content/blog/04-no-sidebar.md delete mode 100644 exampleSite/content/blog/04-post.md create mode 100644 exampleSite/content/blog/06-comments.md delete mode 100644 exampleSite/content/blog/06-post.md 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-comments.md b/exampleSite/content/blog/06-comments.md new file mode 100644 index 0000000..6fa3771 --- /dev/null +++ b/exampleSite/content/blog/06-comments.md @@ -0,0 +1,12 @@ ++++ +description = "Example of a post with comments" +date = "2018-02-06T00:00:00" +thumbnail = "images/pic08.jpg" +image = "images/pic01.jpg" +title = "Comment Example" +slug = "comment-example" +author = "John Smith" +draft = false +disqusid = "6" ++++ +Example of a post with comments using Disqus. \ No newline at end of file diff --git a/exampleSite/content/blog/06-post.md b/exampleSite/content/blog/06-post.md deleted file mode 100644 index 3231657..0000000 --- a/exampleSite/content/blog/06-post.md +++ /dev/null @@ -1,12 +0,0 @@ -+++ -description = "Sixth post description" -date = "2018-02-06T00:00:00" -thumbnail = "images/pic08.jpg" -image = "images/pic01.jpg" -title = "Sixth post" -slug = "sixth-post" -author = "John Smith" -draft = false -disqusid = "6" -+++ -Testing content \ 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 @@
- {{ 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)) }}
{{ if eq .Site.Params.Sidebar.position "left" }}
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": { -- cgit v1.2.3 From 07572972a65c7ee324e6168a5a073da993c23abd Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Sun, 18 Feb 2018 21:10:21 +0000 Subject: :memo: Add Front Matter documentation --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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. -- cgit v1.2.3