From 01322efeb2c8b0521d66de459cbe3b9d71e1259e Mon Sep 17 00:00:00 2001
From: Alexandre Vicenzi <vicenzi.alexandre@gmail.com>
Date: Mon, 15 Jun 2020 19:52:15 +0200
Subject: [PATCH] Cleanup and Fixes

---
 README.md                               |  1 -
 exampleSite/content/post/hidden-page.md | 11 -----------
 exampleSite/content/post/soho.md        |  1 -
 layouts/_default/category.html          |  8 +-------
 layouts/_default/list.html              |  8 +-------
 layouts/_default/single.html            |  2 +-
 layouts/_default/taxonomy.html          |  8 +-------
 layouts/index.html                      | 14 ++++----------
 layouts/partials/footer.html            |  9 ++++-----
 layouts/partials/sidebar.html           |  4 ++--
 static/css/hyde.css                     |  2 +-
 11 files changed, 15 insertions(+), 53 deletions(-)
 delete mode 100644 exampleSite/content/post/hidden-page.md

diff --git a/README.md b/README.md
index d7e4b8e..d44d729 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,6 @@ Soho is a minimalist two-column [hugo](https://gohugo.io) theme based on [Hyde](
 - Rich Snippets (JSON-LD)
 - Twitter Card
 - Pagination
-- Hidden Pages
 - Customizable
 - Support all [Hugo Internals](https://gohugo.io/templates/internal/)
 
diff --git a/exampleSite/content/post/hidden-page.md b/exampleSite/content/post/hidden-page.md
deleted file mode 100644
index e349ce8..0000000
--- a/exampleSite/content/post/hidden-page.md
+++ /dev/null
@@ -1,11 +0,0 @@
-+++
-title = "Hidden Page"
-date = "2020-02-01"
-description = "This page is hidden and should not be visible without knowing the URL."
-tags = [
-    "privacy",
-]
-hidden = true
-+++
-
-This page is hidden and should not be visible without knowing the URL.
diff --git a/exampleSite/content/post/soho.md b/exampleSite/content/post/soho.md
index 5819f9b..2abc893 100644
--- a/exampleSite/content/post/soho.md
+++ b/exampleSite/content/post/soho.md
@@ -19,7 +19,6 @@ tags = [
 - Rich Snippets (JSON-LD)
 - Twitter Card
 - Pagination
-- Hidden Pages
 - Customizable
 - Support all [Hugo Internals](https://gohugo.io/templates/internal/)
 
diff --git a/layouts/_default/category.html b/layouts/_default/category.html
index 294ab65..f66747e 100644
--- a/layouts/_default/category.html
+++ b/layouts/_default/category.html
@@ -1,13 +1,7 @@
 {{ define "main" -}}
 <ul class="posts">
   <h1>Category: {{ .Title }}</h1>
-  {{ $regularPages := .Data.Pages -}}
-  {{ $pagesNotHidden := where $regularPages ".Params.hidden" "==" false }}
-  {{ $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil }}
-
-  {{ $pages := $pagesNotHidden | union $pagesHiddenUnset }}
-
-  {{ range $pages -}}
+  {{ range .Data.Pages -}}
   <li>
     <span>
         <a href="{{ .Permalink }}">{{ .Title }}</a>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 665318d..752b805 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,13 +1,7 @@
 {{ define "main" -}}
 <ul class="posts">
   <h1>{{ .Title }}</h1>
-  {{ $regularPages := .Data.Pages -}}
-  {{ $pagesNotHidden := where $regularPages ".Params.hidden" "==" false }}
-  {{ $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil }}
-
-  {{ $pages := $pagesNotHidden | union $pagesHiddenUnset }}
-
-  {{ range $pages -}}
+  {{ range .Data.Pages -}}
   <li>
     <span>
         <a href="{{ .Permalink }}">{{ .Title }}</a>
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index b3554ca..80217af 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -4,7 +4,7 @@
 
   {{ if ne .Type "page" -}}
   <div class="post-date">
-    <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> · {{ .ReadingTime }} min read
+    <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> &middot; {{ .ReadingTime }} min read
   </div>
   {{- end }}
 
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html
index d9be653..34a87e0 100644
--- a/layouts/_default/taxonomy.html
+++ b/layouts/_default/taxonomy.html
@@ -1,13 +1,7 @@
 {{ define "main" -}}
 <ul class="posts">
   <h1>Tag: {{ .Title }}</h1>
-  {{ $regularPages := .Data.Pages -}}
-  {{ $pagesNotHidden := where $regularPages ".Params.hidden" "==" false }}
-  {{ $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil }}
-
-  {{ $pages := $pagesNotHidden | union $pagesHiddenUnset }}
-
-  {{ range $pages -}}
+  {{ range .Data.Pages -}}
   <li>
     <span>
         <a href="{{ .Permalink }}">{{ .Title }}</a>
diff --git a/layouts/index.html b/layouts/index.html
index 3de3e62..01b8253 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,10 +1,6 @@
 {{ define "main" -}}
   <div class="posts">
-    {{- $regularPages := where .Site.RegularPages "Type" "in" .Site.Params.MainSections -}}
-    {{- $pagesNotHidden := where $regularPages ".Params.hidden" "==" false -}}
-    {{- $pagesHiddenUnset := where $regularPages ".Params.hidden" "==" nil -}}
-
-    {{- $pages := $pagesNotHidden | union $pagesHiddenUnset -}}
+    {{- $pages := where .Site.RegularPages "Type" "in" .Site.Params.MainSections -}}
     {{- $paginator := .Paginate $pages -}}
 
     {{ range $paginator.Pages }}
@@ -14,14 +10,12 @@
         </h1>
 
         <div class="post-date">
-          <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> · {{ .ReadingTime }} min read
+          <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> &middot; {{ .ReadingTime }} min read
         </div>
 
-        {{ if .Description }}
-          {{ .Description }}
-        {{ else }}
+        <div>
           {{ .Summary }}
-        {{ end }}
+        </div>
 
         {{ if .Truncated }}
         <div class="read-more-link">
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index cb0327c..354fbd9 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,14 +1,13 @@
 <footer>
   <div>
     &copy; {{ $.Site.Params.Copyright }} {{ now.Format "2006"}}
-    ·
+
     {{ with $.Site.Params.License }}
-    <a href="{{ $.Site.Params.licenseURL }}"
-       target="_blank">{{ . | safeHTML }}</a>
+    &middot; <a href="{{ $.Site.Params.licenseURL }}" target="_blank">{{ . | safeHTML }}</a>
     {{end}}
+
     {{ with $.Site.Params.BuiltWith }}
-    ·
-    Build with <a href="https://gohugo.io/" target="_blank">Hugo</a> & <a href="https://themes.gohugo.io/soho/" target="_blank">Soho</a> theme
+    &middot; Build with <a href="https://gohugo.io/" target="_blank">Hugo</a> & <a href="https://themes.gohugo.io/soho/" target="_blank">Soho</a> theme
     {{end}}
   </div>
 </footer>
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 22ecbf5..5ce773f 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -27,7 +27,7 @@
         </li>
         {{ range .Site.Menus.main -}}
         <li>
-          <a href="{{.URL}}"> {{ .Name }} </a>
+          <a href="{{ .URL }}"> {{ .Name }} </a>
         </li>
         {{- end }}
       </ul>
@@ -35,7 +35,7 @@
 
     <section class="social-icons">
       {{ range $item := .Site.Params.socialIcons }}
-      <a href="{{ $item.url }}" rel="me" title="{{ $item.title }}">
+      <a href="{{ $item.url }}" rel="me" title="{{ $item.title }}" target="_blank">
         <i class="fab {{ $item.icon }}" aria-hidden="true"></i>
       </a>
       {{ end }}
diff --git a/static/css/hyde.css b/static/css/hyde.css
index 4f41617..3692a71 100644
--- a/static/css/hyde.css
+++ b/static/css/hyde.css
@@ -214,7 +214,7 @@ ul.posts {
 .pagination {
   justify-content: center;
   display: flex;
-  margin: 1em 0;
+  margin: 1em 0 2rem 0;
   padding: 0;
 }
 
-- 
GitLab