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

github.com/zerostaticthemes/hugo-serif-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Austin <rob@jugglerdigital.com>2019-03-01 04:50:05 +0300
committerRobert Austin <rob@jugglerdigital.com>2019-03-01 04:50:05 +0300
commitdf5531fd808473d4507a2b4e0d01ecf0d74d6026 (patch)
tree6eefa2100fd75b93a88f04329746dc7ab1f3ce5e /README.md
parentba4d04557dc975ad34a4acbff3f23287b0339122 (diff)
add configurable meta-tags
Diffstat (limited to 'README.md')
-rw-r--r--README.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/README.md b/README.md
index fa60803..d2b6d0a 100644
--- a/README.md
+++ b/README.md
@@ -67,3 +67,42 @@ hugo server
```
Now enter [`localhost:1313`](http://localhost:1313) in the address bar of your browser.
+
+# Configuring theme features
+
+### Homepage meta tags
+
+Often a homepage requires special meta tags such as a meta description or og meta data for twitter, facebook etc. You can configure these values in the `config.toml`
+
+```
+// config.toml
+[params]
+ google_analytics_id=""
+
+ [params.homepage_meta_tags]
+ meta_description = "a description of your website."
+ meta_og_title = "My Theme"
+ meta_og_type = "website"
+ meta_og_url = "https://www.mywebsite.com"
+ meta_og_image = "https://www.mywebsite.com/images/tn.png"
+ meta_og_description = "a description of your website."
+ meta_twitter_card = "summary"
+ meta_twitter_site = "@mytwitterhandle"
+ meta_twitter_creator = "@mytwitterhandle"
+```
+
+### Set meta tags on a per template/page basis
+
+You can set meta tags on a per template basis using a block. For example, you might want to write a custom meta description for the `/services` page. You can insert any valid HTML meta data inside the `{{ define "meta_tags }}` block at the top of a template.
+
+```
+// layouts/services/list.html
+...
+
+{{ define "meta_tags" }}
+ <meta name="description" content="We offer a variety of services in the finance industry" />
+{{ end }}
+
+{{ define main }}
+...
+```