mirror of https://github.com/lxndrblz/anatole.git

Alexander Bilz
12.27.2021 3eaf93dd8acd0cec4cff434f294ad076b499d665
Made defining of taxonomy conditional

Closes #151
3 files modified
11 ■■■■ changed files
README.md 2 ●●● patch | view | raw | blame | history
exampleSite/config.toml 4 ●●●● patch | view | raw | blame | history
layouts/partials/head.html 5 ●●●●● patch | view | raw | blame | history
README.md
@@ -310,7 +310,7 @@
```
### Open Graph Support
The [internal template for Open Graph protocol](https://gohugo.io/templates/internal/#open-graph) uses a mix of configuration variables; settings in `config.toml` and frontmatter of  the page.
The [internal template for Open Graph protocol](https://gohugo.io/templates/internal/#open-graph) uses a mix of configuration variables; settings in `config.toml` and frontmatter of the page. In a nutshell, you will have to configure a taxonomies series.
### Post Thumbnails
Thumbnails can be enabled easily by setting the `thumbnail` parameter in the frontmatter of a post to an image such as `"images/landscape.jpg"`.
exampleSite/config.toml
@@ -99,7 +99,3 @@
  weight = 400
  identifier = "contact"
  url = "/contact/"
## Taxonomies for Opengraph
[taxonomies]
  series = "series"
layouts/partials/head.html
@@ -96,5 +96,10 @@
    {{ template "_internal/twitter_cards.html" . }}
    <!-- Open Graph -->
    {{- if isset .Site.Taxonomies "series" }}
    {{- if not (eq (len .Site.Taxonomies.series) 0) -}}
    {{ template "_internal/opengraph.html" . }}
    {{- end -}}
    {{- end }}
</head>