Skip to content

Commit 2569c71

Browse files
committed
Theme: Add meta tags to posts for author, og:type and article:published_time
1 parent a30ad5c commit 2569c71

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

_includes/opengraph.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,16 @@
4545
{% endif %}
4646
<meta name="twitter:card" content="summary_large_image">
4747

48-
4948
{% if layout.amethyst.pagetype == "navigation" %}
5049
<meta name="robots" content="{{ page.amethyst.robots | default: layout.amethyst.robots | default: 'noindex,follow' }}">
5150
<meta name="docsearch:amethyst_pagetype_navigation" content="1">
5251
{% endif %}
5352

53+
{% if page.layout == "post" and page.date and page.author %}
54+
<meta property="og:type" content="article">
55+
<meta property="article:published_time" content="{{ page.date | date_to_xmlschema }}">
56+
<meta name="author" content="{% include author-text.html author=page.author %}">
57+
{% endif %}
58+
5459
{% endcapture -%}
5560
{{ opengraph | strip_newlines }}

0 commit comments

Comments
 (0)