From 435a29679d2ecf4afa180b7f8a5cd792a6b5b764 Mon Sep 17 00:00:00 2001 From: Nathan Biller Date: Thu, 3 Oct 2019 10:16:01 -0400 Subject: [PATCH 1/3] Moved the homepage partials to the index.html file from the baseof.html template per souvou's recommendations. Single pages are working for me again :) --- layouts/_default/baseof.html | 29 ----------------------------- layouts/index.html | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index f7762a6..241055d 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -12,33 +12,6 @@ {{ block "main" . }} - - {{ if .Site.Params.hero }} - {{ partial "hero.html" . }} - {{ end }} - - {{ if .Site.Params.section1 }} - {{ partial "section1.html" . }} - {{ end }} - - {{ if .Site.Params.section2 }} - {{ partial "section2.html" . }} - {{ end }} - - {{ if .Site.Params.section3 }} - {{ partial "section3.html" . }} - {{ end }} - - {{ if .Site.Params.section4 }} - {{ partial "section4.html" . }} - {{ end }} - - {{ if .Site.Params.section5 }} - {{ partial "section5.html" . }} - {{ end }} - - {{ if .Site.Params.footer }} - {{ partial "footer.html" . }} {{ end }} @@ -47,8 +20,6 @@ {{ if .Site.Params.sidebar }} {{ partial "sidebar.html" . }} {{ end }} - - {{ end }} {{ partial "javascript.html" . }} diff --git a/layouts/index.html b/layouts/index.html index f319bf9..1d00000 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,2 +1,37 @@ {{ define "main" }} + {{ if .Site.Params.hero }} + {{ partial "hero.html" . }} + {{ end }} + + {{ if .Site.Params.section1 }} + {{ partial "section1.html" . }} + {{ end }} + + {{ if .Site.Params.section2 }} + {{ partial "section2.html" . }} + {{ end }} + + {{ if .Site.Params.section3 }} + {{ partial "section3.html" . }} + {{ end }} + + {{ if .Site.Params.section4 }} + {{ partial "section4.html" . }} + {{ end }} + + {{ if .Site.Params.section5 }} + {{ partial "section5.html" . }} + {{ end }} + + {{ if .Site.Params.footer }} + {{ partial "footer.html" . }} + {{ end }} + + +
+ + {{ if .Site.Params.sidebar }} + {{ partial "sidebar.html" . }} + {{ end }} + {{ end }} \ No newline at end of file From 83b14be2b2b9fba92e18996ecc965d5bcdfa21bf Mon Sep 17 00:00:00 2001 From: Nathan Biller Date: Thu, 3 Oct 2019 10:43:13 -0400 Subject: [PATCH 2/3] Added the ability to add a footer on a single page using front matter. If include_footer: true is present, then the footer will be displayed. --- layouts/_default/single.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7ac3c1f..0c91775 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -15,6 +15,10 @@ {{ partial "single/single.html" . }} + {{ if .Params.include_footer }} + {{ partial "footer.html" . }} + {{ end }} +
From 57bdb3e24de2c24834c9fd3da646a644ff2226b6 Mon Sep 17 00:00:00 2001 From: Nathan Biller Date: Thu, 3 Oct 2019 10:46:09 -0400 Subject: [PATCH 3/3] Added instructions on how to include a footer on single pages. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 3593d25..09676b6 100644 --- a/README.md +++ b/README.md @@ -290,6 +290,8 @@ Single pages displays a single unit of information and are more or less independ You can create single pages in the `content` directory (even sub-dirs are possible). +If you'd like to have the footer displayed on your single page include "include_footer: true" in your front matter. +
Code @@ -298,6 +300,7 @@ You can create single pages in the `content` directory (even sub-dirs are possib title: AGB sidebar: true # or false to display the sidebar sidebarlogo: fresh-white-alt # From (static/images/logo/) +include_footer: true --- ```