Open Graph for Jekyll
{% capture header %} | |
{% if page.title %} | |
<meta property="og:type" content="article" /> | |
<meta property="og:title" content="{{ page.title }}" /> | |
{% else %} | |
<meta property="og:type" content="website" /> | |
{% endif %} | |
{% include meta.html property="og:site_name" content=site.title %} | |
{% include meta.html property="og:image" content=page.thumbnail %} | |
{% capture page_url %}{{ page.url | replace:'/index.html','/' | append: site.url | append: site.baseurl }}{% endcapture %} | |
{% include meta.html property="og:url" content=page_url %} | |
{% capture page_date %}{{page.date | date_to_xmlschema}}{% endcapture %} | |
{% include meta.html property="article:published_time" content=page_date %} | |
{% if page.author.url %} | |
<meta property="article:author" content="{{ page.author.url }}" /> | |
<link rel="author" href="{{ page.author.url }}" /> | |
{% elsif site.owner_link %} | |
<meta property="article:author" content="{{ site.owner_link }}" /> | |
<link rel="author" href="{{ site.owner_link }}" /> | |
{% endif %} | |
{% endcapture %}{{ header | strip_newlines }} |
This comment has been minimized.
This comment has been minimized.
maybe it would be better to use 'jekyll-seo-tag' plugin? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
nice hack👍