Skip to content

Commit ee0f841

Browse files
authored
adds custom meta to head via front matter (#394)
### Description In #380, @dmolik was trying to add a custom meta tags for the go package manager. His solution was limited and specific to to the specific situation with the go package manager but custom tags in the header are not an uncommon ask, so I wanted a generalizable solution. This PR adds the ability for add tags directly to any page in the meta block. ### Issues Resolved n/a ### Check List - [x] Commits are signed per the DCO using `--signoff` By submitting this pull request, I confirm that my contribution is made under the terms of the BSD-3-Clause License. Signed-off-by: Kyle J. Davis <[email protected]>
1 parent 2508b75 commit ee0f841

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

templates/includes/head.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
<meta name="Copyright" content="" />
88
<meta name="keywords" content="open-source, valkey" />
99
<meta property="og:image" content="/img/valkey-logo-og.png" />
10+
{% if page and page.extra and page.extra.custom_meta%}
11+
{{ page.extra.custom_meta | safe }}
12+
{% endif %}
13+
{% if section and section.extra and section.extra.custom_meta%}
14+
{{ section.extra.custom_meta | safe }}
15+
{% endif %}
16+
1017
{% if page and page.description %}<meta name="description" content="{{ page.description}}" />
1118
{% elif section and section.description %}<meta name="description" content="{{ section.description}}" />{% endif %}
1219

0 commit comments

Comments
 (0)