Improve tooling

master
Dario Ernst 4 years ago
parent e74f350774
commit 340e173b94

@ -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/

@ -1,8 +1,10 @@
<!DOCTYPE html>
<html>
<body>
<div id="content">
{{- block "main" . }}{{ end }}
</div>
</body>
<body>
<div id="content">
<input type="text" id="searchInput" onkeyup="filterElements()" placeholder="Search …">
{{- block "main" . }}{{ end }}
</div>
</body>
<script src="js/view.js"></script>
</html>

@ -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 -}}

@ -1,7 +1,5 @@
{{ define "main" }}
{{ range $index, $element := .Site.RegularPages }} {{/* Ranging over all the posts */}}
<div class="column is-one-quarter">
{{ partial "summary.html" . }} {{/* pass in the element to the partial */}}
</div>
{{ end }}
{{ partial "summary.html" . }} {{/* pass in the element to the partial */}}
{{ end }}
{{ end }}

@ -1 +1,4 @@
<a href="{{ .Permalink }}"><p class="title is-4 has-text-centered">{{ $.Title }} </a> (<a href="print/{{ .File.BaseFileName }}.pdf">PDF</a>)</p>
<p class="recipe">
<a href="{{ .Permalink }}">{{ $.Title }} </a>
(<a href="print/{{ .File.BaseFileName }}.pdf">PDF</a>)
</p>

Loading…
Cancel
Save