Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pjbakker/flexible-seo-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul <paul@brainspark.nl>2020-03-10 23:10:32 +0300
committerPaul <paul@brainspark.nl>2020-03-10 23:15:47 +0300
commitc0e0c85c82ea827c6c236003688a38a5b5ad05cc (patch)
treedf69fa13a9e0891d5a0025c1afa5a02967be0c74
parent20861d9868d631d45479590d7bafd0814c7c73fa (diff)
Consistent naming of xType
-rw-r--r--README.md11
-rw-r--r--layouts/partials/footer.html2
-rw-r--r--layouts/partials/header.html2
-rw-r--r--layouts/partials/nav.html2
4 files changed, 10 insertions, 7 deletions
diff --git a/README.md b/README.md
index 2ccaf61..b3c3714 100644
--- a/README.md
+++ b/README.md
@@ -22,15 +22,18 @@ Of course there is also support for:
## Switching navigation, header or footer
-Within your `config.toml` add the according parameter you want the theme to use. By default, the theme uses 'simples' for navigation, header and footer.
+Within your `config.toml` add the according parameter you want the theme to use. By default, the theme uses 'simples' for home, navigation, header and footer.
~~~
[Params]
- nav = "simple"
- header = "simple"
- footer = "simple"
+ homeType = "simple"
+ navType = "simple"
+ headerType = "simple"
+ footerType = "simple"
~~~
+You can set headerType on a page level!
+
The theme will look for the theme parts in *layouts/partials/navs/*, *layouts/partials/headers/*, and *layouts/partials/footers/* accordingly. For instance, with `nav = "simple"`, it will look for *layouts/partials/navs/simple.html*.
### Supported page header styles
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 442aa08..7e2af86 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,4 +1,4 @@
-{{- $footer_type := .Site.Params.Footer | default "simple" }}
+{{- $footer_type := .Site.Params.footerType | default "simple" }}
{{- $footer_file := printf "footers/%s.html" $footer_type }}
{{- partial $footer_file . }}
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 5c10636..1892410 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,3 +1,3 @@
-{{- $header_type := .Params.Header | default .Site.Params.Header | default "simple" }}
+{{- $header_type := .Params.headerType | default .Site.Params.headerType | default "simple" }}
{{- $header_file := printf "headers/%s.html" $header_type }}
{{- partial $header_file . }}
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index b76b3cc..c74008f 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -1,3 +1,3 @@
-{{- $nav_type := .Site.Params.Nav | default "simple" }}
+{{- $nav_type := .Site.Params.navType | default "simple" }}
{{- $nav_file := printf "navs/%s.html" $nav_type }}
{{- partial $nav_file . }}