Last active
April 9, 2025 14:56
-
-
Save davidensinger/5431869 to your computer and use it in GitHub Desktop.
Adding Open Graph Tags to Jekyll
Line 18:
<meta content="{{ site.url }}{{ page.url }}" property="og:url">
Jekyll sites can be hosted at a path deeper than the domain root (e.g. GitHub Project Pages are at <username>.github.io/<projectname>
), which is usually indicated with site.baseurl
. For maximum generality, I would recommend, for Jekyll 3.3 and later, that this line be changed to:
<meta content="{{ page.url | absolute_url }}" property="og:url">
and for earlier versions of Jekyll that don't support the absolute_url
filter,
<meta content="{{ site.url | append: site.baseurl | append: page.url }}" property="og:url">
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For some of these fields, should they use
| escape
?