From 4a5e3eb1f4c06f07f517c48d0a7223c37b562985 Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Wed, 4 Jan 2017 02:52:47 +0100 Subject: [PATCH 01/17] Change the default list display a content and a list Inside a section, you can have a name_of_the_section.md with a content displayed before the list --- layouts/_default/list.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 52fe67e..48dbd99 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -2,14 +2,23 @@
+ {{ $globalTitle := .Title}} +
+ {{ range .Data.Pages }} + {{ if eq .Title $globalTitle }} + {{ .Content }} + {{ end }} + {{ end }} +
{{ .Title }}
    {{ range .Data.Pages.ByPublishDate }} - {{ partial "li.html" . }} + {{ if ne .Title $globalTitle }} + {{ partial "li.html" . }} + {{ end }} {{ end }}
{{ partial "footer.html" . }} - From b627e137086914d8b9b2741978a97cf9098592aa Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Wed, 4 Jan 2017 02:53:02 +0100 Subject: [PATCH 02/17] Add more padding to the left of bullets in lists --- static/css/main.css | 1 + 1 file changed, 1 insertion(+) diff --git a/static/css/main.css b/static/css/main.css index db156df..7968340 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -551,6 +551,7 @@ section.main .container .content .post-item { section.main .container .content .post-item { display: flex; list-style: none; + padding-left: 1.5em; } section.main .container .content .post-item .meta { display: block; From cc057fff6d93939697317e56d597389ed6ba7ccc Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Wed, 4 Jan 2017 12:10:36 +0100 Subject: [PATCH 03/17] Update highlight js to 9.9 --- layouts/partials/head_includes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/head_includes.html b/layouts/partials/head_includes.html index b7fbbe1..7391e36 100644 --- a/layouts/partials/head_includes.html +++ b/layouts/partials/head_includes.html @@ -11,7 +11,7 @@ {{ if .Site.Params.highlightjs }} - + {{ end }} From 8639f8a8b0305be8047e15048b37e2a22402d1f4 Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Wed, 4 Jan 2017 12:11:07 +0100 Subject: [PATCH 04/17] Remove initials --- layouts/blog/single.html | 1 - 1 file changed, 1 deletion(-) diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 3ed9559..d84bb2f 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -6,7 +6,6 @@
{{ partial "page-heading" . }} -
{{ .Date.Format .Site.Params.dateform }}
From 5c5fe525d626a1656014a72968679f67a49b8b4f Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Wed, 4 Jan 2017 13:48:27 +0100 Subject: [PATCH 05/17] Enumerate sections in the header to do links --- layouts/_default/{list.html => section.html} | 2 ++ layouts/partials/header.html | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) rename layouts/_default/{list.html => section.html} (88%) diff --git a/layouts/_default/list.html b/layouts/_default/section.html similarity index 88% rename from layouts/_default/list.html rename to layouts/_default/section.html index 48dbd99..54b2c0b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/section.html @@ -10,6 +10,7 @@ {{ end }} {{ end }}
+ {{ if ne (len (where .Data.Pages "Title" "!=" $globalTitle)) 0}}
{{ .Title }}
    {{ range .Data.Pages.ByPublishDate }} @@ -18,6 +19,7 @@ {{ end }} {{ end }}
+ {{ end }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html index e659861..761647d 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -5,10 +5,10 @@ -{{ if .IsHome }} -
-{{ else }} +{{ if .IsPage }}
+{{ else }} +
{{ end }}
@@ -16,9 +16,16 @@

{{ .Site.Title }}

From 5ff6beef99eb19f28d42785c7015b6c6d79b6b1a Mon Sep 17 00:00:00 2001 From: Alexis Tacnet Date: Wed, 4 Jan 2017 13:48:52 +0100 Subject: [PATCH 06/17] Add grouping by month and year in the blog section --- layouts/index.html | 13 ++++++++++--- layouts/section/blog.html | 17 +++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 layouts/section/blog.html diff --git a/layouts/index.html b/layouts/index.html index e0d6c25..47dd0e2 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,10 +2,17 @@
-
Blog
+ {{ range where .Data.Pages "Title" "Home"}} +
+ {{ .Content }} +
+ {{ end }} +