diff options
author | Nicholas Johnson <nick@nicksphere.ch> | 2022-08-04 00:00:00 +0000 |
---|---|---|
committer | Nicholas Johnson <nick@nicksphere.ch> | 2022-08-04 00:00:00 +0000 |
commit | 157f564b9a35dd8e327a33b45b50167ff4f332cbe2be3629dd6106f026095743 (patch) | |
tree | 666ff8ff709f194f934ab363f0c212b84525cbfb21505d06fdc8b1e771b4e501 /layouts | |
parent | 2de93801e1a8a657f0f98bf363ac3485cd11e1722d5feb33226860b8b3509bd7 (diff) | |
download | hugo-theme-journal-157f564b9a35dd8e327a33b45b50167ff4f332cbe2be3629dd6106f026095743.tar.gz hugo-theme-journal-157f564b9a35dd8e327a33b45b50167ff4f332cbe2be3629dd6106f026095743.zip |
Remove extra newlines from HTML output
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/single.html | 6 | ||||
-rw-r--r-- | layouts/index.html | 6 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 2 | ||||
-rw-r--r-- | layouts/partials/header.html | 2 | ||||
-rw-r--r-- | layouts/partials/metadata.html | 6 |
6 files changed, 12 insertions, 12 deletions
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" -}} <nav> <p><a href="/" rel="noreferrer">Return to homepage</a></p> </nav> <main> - {{ .Content }} + {{ .Content -}} </main> -{{ 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" -}} <main> <h1>{{ .Site.Params.indexTitle }}</h1> <p>{{ .Site.Params.indexIntro }}</p> @@ -11,6 +11,6 @@ </p> </nav> <h2>Journal Entries</h2> - {{ partial "metadata.html" . }} + {{ partial "metadata.html" . -}} </main> -{{ 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 @@ <footer> <p>Unless otherwise noted, the writing in this journal is licensed under {{ $.Site.Copyright }}<br> Copyright {{ .Site.Params.beginCopyrightYear }}-{{ now.Format "2006" }} {{ $.Site.Author.name }}</p> -</footer> +</footer>
\ 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 @@ <meta name="theme-color" content="#000"> <link rel="stylesheet" type="text/css" href="/css/style.css"> <title>{{ $.Site.Title }}</title> -</head> +</head>
\ 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 @@ <header> <pre>{{ $.Site.Params.logo }}</pre> -</header> +</header>
\ 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" -}} <article> <header> <p>{{ .PublishDate.Format $dateFormat }} - {{ .ReadingTime }} minute read<br> <a href="{{ .RelPermalink }}" rel="noreferrer">{{ .Title }}</a></p> </header> </article> -{{ end }} +{{ end }}
\ No newline at end of file |