From 55e42857e8cb82ba8f025d8e38cc60b959d5a4ca Mon Sep 17 00:00:00 2001 From: earnest ma Date: Tue, 30 Nov 2021 09:56:53 -0500 Subject: [PATCH] feat: Move to pageslist partial --- layouts/_default/list.html | 12 ++---------- layouts/_default/single.html | 18 ++++++++---------- layouts/partials/pageslist.html | 8 ++++++++ 3 files changed, 18 insertions(+), 20 deletions(-) create mode 100644 layouts/partials/pageslist.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 144130f..5e65b2a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -10,15 +10,7 @@ {{ end }} {{ else }} -

Subpages:

- +{{ partial "pageslist.html" }} {{ end }}
@@ -31,4 +23,4 @@ {{ .Content }} -{{ end }} +{{ end }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index a06cade..fdae686 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,13 +1,11 @@ {{ define "main" }} - -

Subpages:

- - +{{ partial "pageslist.html" }} +
+

{{ .Title }}

+{{ if $.Params.enabletoc }} +
+ {{ .Page.TableOfContents }} +
+{{ end }} {{ .Content }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/pageslist.html b/layouts/partials/pageslist.html new file mode 100644 index 0000000..dfbac4f --- /dev/null +++ b/layouts/partials/pageslist.html @@ -0,0 +1,8 @@ + \ No newline at end of file