Skip to content

Commit d82a7b6

Browse files
authored
fix(seo): meta-tags (#282)
* fix(seo): meta-tags * Replace og with og:
1 parent 5a4d7e6 commit d82a7b6

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

src/site/_includes/components/pageheader.njk

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2+
3+
{% if metatags %}
4+
{% for name, content in metatags %}
5+
{% if name.includes("og:") %}
6+
<meta property="{{ name }}" content="{{ content }}">
7+
{% else %}
8+
<meta name="{{ name }}" content="{{ content }}">
9+
{% endif %}
10+
{% endfor %}
11+
{% endif %}
12+
213
<script async type="module">
314
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
415
</script>
@@ -30,16 +41,10 @@
3041

3142
{% favicons './src/site/favicon.svg', appleIconBgColor='#123' %}
3243

33-
{% if metatags %}
34-
{% for name, content in metatags %}
35-
<meta name="{{ name }}" content="{{ content }}">
36-
{% endfor %}
37-
{% endif %}
38-
3944
{% if meta.styleSettingsCss %}
4045
<style>
4146
{{ meta.styleSettingsCss | safe }}
4247
</style>
4348
{% endif %}
4449
<style>
45-
</style>
50+
</style>

0 commit comments

Comments
 (0)