cp from ffd9dac4218b8f1709de04f7131ca661715fc481 & fe77f7434bc0d7a9b54af69014eb28dbea2b236b
tpl: Update date logic of opengraph and schema internal
templates
* Fix: updated date logic in opengraph template
* Updated date logic in schema template
* Reformatted opengraph and schema
* Wrapped PublishDate and Lastmod in with
tpl: Make the build green again
Co-authored-by: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= <bjorn.erik.pedersen@gmail.com>
Signed-off-by: Aditya Telange <21258296+adityatelange@users.noreply.github.com>
* Without this, the section name gets mangled when the language was a
sub-string of the section. For example, under 'en', a section named
"fragment" changes to "fragmt".
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
series:
- My Series
```
```gohtml
{{/* in a template */}}
{{- $series := index .Site.Taxonomies.series$name }}
{{/* was resolved to */}}
{{- $series := index {'my-series': ...} "MySeries" }}
```
(cherry picked from commit d2d493ab5d6a054001a8448ea0de2949dac4b30e)
* json-schema: init
* sameAs can be set through .Site.Params.schema.sameAs
* if it is not specified but social-icons exsists, we use social-icons for sameAs vars
* .Site.Params.schema.sameAs overrides social-icons
* publisherType can be changed via .Site.Params.schema.publisherType