From 5d283cd3a9d69d8ff3537d6fddb14e607f785d89 Mon Sep 17 00:00:00 2001 From: James Montgomerie <68861+th-in-gs@users.noreply.github.com> Date: Sun, 27 Nov 2022 03:59:33 -0800 Subject: [PATCH] Break out the page description from the 'index.html' layout into its own partial - this adds the ability for a site to customize the description on the main page without altering the theme. (#71) --- layouts/index.html | 9 +-------- layouts/partials/pagedescription.html | 7 +++++++ 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 layouts/partials/pagedescription.html diff --git a/layouts/index.html b/layouts/index.html index c556e82..84fd0a8 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -17,14 +17,7 @@

{{.Title}}

-
- {{ if isset .Params "description" }} - {{ .Description }} - {{ else }} - {{ .Summary }}… - {{ end }} -
- Read more ⟶ +
{{ template "partials/pagedescription.html" . }}
{{ end }} {{ template "partials/paginator.html" . }} diff --git a/layouts/partials/pagedescription.html b/layouts/partials/pagedescription.html new file mode 100644 index 0000000..d69bb9a --- /dev/null +++ b/layouts/partials/pagedescription.html @@ -0,0 +1,7 @@ +
+ {{ if isset .Params "description" }} + {{ .Description }} + {{ else }} + {{ .Summary }}… + {{ end }} +
\ No newline at end of file