From f601584822fb6cc5877b2a28848e6103a775b35f Mon Sep 17 00:00:00 2001 From: Track3 Date: Wed, 2 Jan 2019 12:08:30 +0800 Subject: [PATCH] Add featured image to normal page template --- archetypes/default.md | 1 + layouts/_default/single.html | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/archetypes/default.md b/archetypes/default.md index d9b98b1..63c1c63 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -3,5 +3,6 @@ title: "{{ replace .Name "-" " " | title }}" date: {{ .Date }} draft: true comments: false +images: --- diff --git a/layouts/_default/single.html b/layouts/_default/single.html index ef53a18..a00bc3b 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,8 +1,25 @@ +{{ define "head" }} + +{{ end }} + {{ define "header" }} -{{ partialCached "header.html" . }} +{{ partial "header.html" . }} {{ end }} {{ define "main" }} + {{- if (or .Params.images .Params.featuredImg) }} +
+ {{- end }}

{{ .Title }}