From 157f564b9a35dd8e327a33b45b50167ff4f332cbe2be3629dd6106f026095743 Mon Sep 17 00:00:00 2001 From: Nicholas Johnson Date: Thu, 4 Aug 2022 00:00:00 +0000 Subject: Remove extra newlines from HTML output --- TODO.txt | 1 - layouts/_default/single.html | 6 +++--- layouts/index.html | 6 +++--- layouts/partials/footer.html | 2 +- layouts/partials/head.html | 2 +- layouts/partials/header.html | 2 +- layouts/partials/metadata.html | 6 +++--- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/TODO.txt b/TODO.txt index e52c4ce..3105982 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,4 +1,3 @@ * fix logo being cut off on mobile devices * make navigation link tap targets bigger on mobile devices * make journal entry link tap targets bigger on mobile devices -* remove extra newlines from HTML output diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ed6063a..54aafbb 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,8 +1,8 @@ -{{ define "main" }} +{{ define "main" -}}
- {{ .Content }} + {{ .Content -}}
-{{ end }} +{{- end }} diff --git a/layouts/index.html b/layouts/index.html index 4a5afd0..02bf301 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,4 +1,4 @@ -{{ define "main" }} +{{ define "main" -}}

{{ .Site.Params.indexTitle }}

{{ .Site.Params.indexIntro }}

@@ -11,6 +11,6 @@

Journal Entries

- {{ partial "metadata.html" . }} + {{ partial "metadata.html" . -}}
-{{ end }} +{{- end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 673e170..daf7cd3 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,4 +1,4 @@ + \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 2e5db26..bc92fc2 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -6,4 +6,4 @@ {{ $.Site.Title }} - + \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 391a013..2a23191 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,3 +1,3 @@
{{ $.Site.Params.logo }}
-
+ \ No newline at end of file diff --git a/layouts/partials/metadata.html b/layouts/partials/metadata.html index aec5e8c..92c0b83 100644 --- a/layouts/partials/metadata.html +++ b/layouts/partials/metadata.html @@ -1,9 +1,9 @@ -{{ range (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse }} -{{ $dateFormat := .Site.Params.dateFormat | default "2 Jan 2006" }} +{{ range (where .Site.RegularPages.ByTitle "Section" "entry").ByPublishDate.Reverse -}} +{{ $dateFormat := .Site.Params.dateFormat | default "2 Jan 2006" -}}

{{ .PublishDate.Format $dateFormat }} - {{ .ReadingTime }} minute read
{{ .Title }}

-{{ end }} +{{ end }} \ No newline at end of file -- cgit v1.2.3