From 340e173b945be8efa6cc3470416baea5ac40786e Mon Sep 17 00:00:00 2001 From: Dario Ernst Date: Tue, 21 Dec 2021 16:51:02 +0100 Subject: [PATCH] Improve tooling --- Makefile | 4 ++-- themes/cookbook/layouts/_default/baseof.html | 12 +++++++----- themes/cookbook/layouts/_default/index.json | 5 ----- themes/cookbook/layouts/index.html | 6 ++---- themes/cookbook/layouts/partials/summary.html | 5 ++++- 5 files changed, 15 insertions(+), 17 deletions(-) delete mode 100644 themes/cookbook/layouts/_default/index.json diff --git a/Makefile b/Makefile index 9a5ad8b..38e9660 100644 --- a/Makefile +++ b/Makefile @@ -17,5 +17,5 @@ hugo: mkdir -p pdf deploy: - scp -r public/* dario@ghostdub.de:~/www-data/rezepte/ - scp pdf/*.pdf dario@ghostdub.de:~/www-data/rezepte/print/ + rsync -aP public/ dario@ghostdub.de:~/www-data/rezepte/ + rsync -aP pdf/*.pdf dario@ghostdub.de:~/www-data/rezepte/print/ diff --git a/themes/cookbook/layouts/_default/baseof.html b/themes/cookbook/layouts/_default/baseof.html index 924b72c..53c5a8d 100644 --- a/themes/cookbook/layouts/_default/baseof.html +++ b/themes/cookbook/layouts/_default/baseof.html @@ -1,8 +1,10 @@ - -
- {{- block "main" . }}{{ end }} -
- + +
+ + {{- block "main" . }}{{ end }} +
+ + diff --git a/themes/cookbook/layouts/_default/index.json b/themes/cookbook/layouts/_default/index.json deleted file mode 100644 index 9cfd8ef..0000000 --- a/themes/cookbook/layouts/_default/index.json +++ /dev/null @@ -1,5 +0,0 @@ -{{- $.Scratch.Add "index" slice -}} -{{- range .Site.RegularPages -}} - {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink "imageLink" .Params.Recipe_image) -}} -{{- end -}} -{{- $.Scratch.Get "index" | jsonify -}} \ No newline at end of file diff --git a/themes/cookbook/layouts/index.html b/themes/cookbook/layouts/index.html index bbac98a..4b72129 100644 --- a/themes/cookbook/layouts/index.html +++ b/themes/cookbook/layouts/index.html @@ -1,7 +1,5 @@ {{ define "main" }} {{ range $index, $element := .Site.RegularPages }} {{/* Ranging over all the posts */}} -
- {{ partial "summary.html" . }} {{/* pass in the element to the partial */}} -
- {{ end }} + {{ partial "summary.html" . }} {{/* pass in the element to the partial */}} + {{ end }} {{ end }} diff --git a/themes/cookbook/layouts/partials/summary.html b/themes/cookbook/layouts/partials/summary.html index 9f36099..c561df7 100644 --- a/themes/cookbook/layouts/partials/summary.html +++ b/themes/cookbook/layouts/partials/summary.html @@ -1 +1,4 @@ -

{{ $.Title }} (PDF)

+

+ {{ $.Title }} + (PDF) +