tpl: Fix series detection in opengraph
authorMaciej Sawicki <humberd2@gmail.com>
Wed, 16 Dec 2020 11:13:30 +0000 (12:13 +0100)
committerGitHub <noreply@github.com>
Wed, 16 Dec 2020 11:13:30 +0000 (12:13 +0100)
commitd2d493ab5d6a054001a8448ea0de2949dac4b30e
treee41609bd1e3294c68cd4df94a75938d5ef65cfd1
parentce96895debb67df20ae24fb5f0f04b98a30cc6cc
tpl: Fix series detection in opengraph

When inside front matter you specified series with spaces,
then the opengraph template wouldn't detect other articles,
because in `.Site.Taxonomies.series` they are stored by
urlized key.

Example:

```yaml
# in front matter
series:
    - My Series
```

```gohtml
{{/* in a template */}}
{{- $series := index .Site.Taxonomies.series$name }}

{{/* was resolved to */}}
{{- $series := index {'my-series': ...} "MySeries" }}
```
tpl/tplimpl/embedded/templates/opengraph.html