Skip to content

Commit 1adf0cd

Browse files
authored
fixes title metadata that messes with LinkedIn (#358)
### Description On LinkedIn, sharing a post from Valkey.io it always makes the title weirdly "command reference". Looking into the LinkedIn Debugging tool it seems like it can't infer our title so we need to add an explicit `og:title` metadata tag. This adds the same logic as the title with colon seperating the page type and title (instead of the middot entity, which is not allowed in this format). ### 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 <kyledvs@amazon.com>
1 parent 67ca56b commit 1adf0cd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

templates/includes/head.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@
3434
Valkey
3535
{%- endif -%}
3636
</title>
37+
<meta name="title" property="og:title" content="{%- if command_title -%}
38+
Valkey Command: {{ command_title }}
39+
{%- elif frontmatter_title -%}
40+
Valkey Documentation: {{ frontmatter_title }}
41+
{%- elif page.title -%}
42+
Valkey: {{ page.title }}
43+
{%- elif section.title -%}
44+
Valkey: {{ section.title }}
45+
{%- else -%}
46+
Valkey
47+
{%- endif -%}">
3748

3849
<link rel="stylesheet" href="/css/styles.css">
3950
<link rel="alternate" type="application/atom+xml" title="Atom feed" href="{{ get_url(path="atom.xml", trailing_slash=false) }}" />

0 commit comments

Comments
 (0)