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

github.com/kishaningithub/hugo-shopping-product-catalogue-simple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKishan B <bkishan@thoughtworks.com>2018-08-05 16:46:21 +0300
committerKishan B <bkishan@thoughtworks.com>2018-08-05 16:46:21 +0300
commit0e96aa8c951fe768e73fb4a26540c3b952372726 (patch)
treedf94cd60251a5af7f6dc203bdbf03289c3e753d1
parentf239fbad19a15fb8c8642e604cae76c2eb10853c (diff)
Add ability to add site description below company name. Fixes #2
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/partials/products/list/product-list.html1
-rw-r--r--layouts/products/single.html1
3 files changed, 4 insertions, 0 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index b644203..31fb4ce 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -2,3 +2,5 @@ baseURL = "http://example.org/"
languageCode = "en-us"
title = "Awesome Lighting Inc."
theme = "hugo-shopping-product-catalogue-simple"
+[Params]
+description = "" \ No newline at end of file
diff --git a/layouts/partials/products/list/product-list.html b/layouts/partials/products/list/product-list.html
index dcc223a..85288af 100644
--- a/layouts/partials/products/list/product-list.html
+++ b/layouts/partials/products/list/product-list.html
@@ -1,5 +1,6 @@
<header>
<h1 class="text-center">{{ .Site.Title }}</h1>
+ {{ with .Site.Params.description }}<h4 class="text-center">{{ . }}</h4>{{ end }}
</header>
<article class="container-fluid">
<div class="row">
diff --git a/layouts/products/single.html b/layouts/products/single.html
index 80888d9..de9a0dc 100644
--- a/layouts/products/single.html
+++ b/layouts/products/single.html
@@ -1,6 +1,7 @@
{{ define "main" }}
<header>
<h1 class="text-center">{{ .Site.Title }}</h1>
+ {{ with .Site.Params.description }}<h4 class="text-center">{{ . }}</h4>{{ end }}
</header>
<article class="container-fluid">
<div class="row">