diff options
author | de-souza <43355143+de-souza@users.noreply.github.com> | 2019-08-23 15:11:24 +0300 |
---|---|---|
committer | de-souza <43355143+de-souza@users.noreply.github.com> | 2019-08-23 15:11:24 +0300 |
commit | ede90ce5adefceff980c50f5aec031a759695336 (patch) | |
tree | f51d9076fcaa98773a13e640b463822eb7ae1993 | |
parent | dd780fb2fdfbd27c4e9a9f7353c696bee1ac3b90 (diff) |
Make metadata optional and disabled by default
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | config.yaml | 3 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 6 |
3 files changed, 10 insertions, 3 deletions
@@ -15,6 +15,7 @@ A lightweight Hugo theme leveraging CSS Flexbox Optional features: - Show summaries on homepage +- Schema.org, Open Graph and Twitter Cards metadata - Utterances comments widget - CSS and JS can be [dynamically embedded](#dynamically-embedded-css-and-js) with shortcodes - Built-in shortcodes: @@ -65,6 +66,9 @@ params: rss: To subscribe to this RSS feed, copy its address and paste it into your favorite feed reader. summaries: false + schema: false + opengraph: false + twittercards: false utterances: enable: false repo: diff --git a/config.yaml b/config.yaml index 5257b7c..9171d11 100644 --- a/config.yaml +++ b/config.yaml @@ -7,6 +7,9 @@ params: rss: To subscribe to this RSS feed, copy its address and paste it into your favorite feed reader. summaries: false + schema: false + opengraph: false + twittercards: false utterances: enabled: false repo: diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 72edd52..7d17574 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -6,9 +6,9 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> - {{ template "_internal/schema.html" . }} - {{ template "_internal/opengraph.html" . }} - {{ template "_internal/twitter_cards.html" . }} + {{ if site.Params.schema }}{{ template "_internal/schema.html" . }}{{ end }} + {{ if site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }} + {{ if site.Params.twittercards }}{{ template "_internal/twitter_cards.html" . }}{{ end }} <title> {{ if eq .Title site.Title }} {{ site.Title }} |