Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Open Graph support for Linkedin #64

Merged
merged 2 commits into from
Aug 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions templates/partials/og.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
{% for admin in FACEBOOK_ADMINS %}
<meta property="fb:admins" content="{{ admin }}" />
{% endfor %}
<meta property="og:site_name" content="{{ SITENAME }}"/>
<meta property="og:type" content="blog"/>
<meta property="og:title" content="{{ SITENAME }}"/>
<meta property="og:description" content="{{ description }}"/>
<meta property="og:locale" content="{{ default_locale }}"/>
<meta property="og:url" content="{{ SITEURL }}/"/>
<meta property="og:image" content="{{ default_cover }}">
<meta prefix="og: http://ogp.me/ns#" property="og:site_name" content="{{ SITENAME }}"/>
<meta prefix="og: http://ogp.me/ns#" property="og:type" content="blog"/>
<meta prefix="og: http://ogp.me/ns#" property="og:title" content="{{ SITENAME }}"/>
<meta prefix="og: http://ogp.me/ns#" property="og:description" content="{{ description }}"/>
<meta prefix="og: http://ogp.me/ns#" property="og:locale" content="{{ default_locale }}"/>
<meta prefix="og: http://ogp.me/ns#" property="og:url" content="{{ SITEURL }}/"/>
<meta prefix="og: http://ogp.me/ns#" property="og:image" content="{{ default_cover }}">

<!-- Twitter Card -->
{% for name,link in SOCIAL if name.lower() in ['twitter'] %}
Expand Down
26 changes: 13 additions & 13 deletions templates/partials/og_article.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@
{% for admin in FACEBOOK_ADMINS %}
<meta property="fb:admins" content="{{ admin }}" />
{% endfor %}
<meta property="og:site_name" content="{{ SITENAME }}"/>
<meta property="og:title" content="{{ article.title|striptags }}"/>
<meta property="og:description" content="{{ description }}"/>
<meta property="og:locale" content="{{ article.metadata.get('og_locale', default_locale) }}"/>
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}"/>
<meta property="og:type" content="article"/>
<meta property="article:published_time" content="{{ article.date }}"/>
<meta property="article:modified_time" content="{{ article.modified }}"/>
<meta property="article:author" content="{{ SITEURL }}/{{ article.author.url }}">
<meta prefix="og: http://ogp.me/ns#" property="og:site_name" content="{{ SITENAME }}"/>
<meta prefix="og: http://ogp.me/ns#" property="og:title" content="{{ article.title|striptags }}"/>
<meta prefix="og: http://ogp.me/ns#" property="og:description" content="{{ description }}"/>
<meta prefix="og: http://ogp.me/ns#" property="og:locale" content="{{ article.metadata.get('og_locale', default_locale) }}"/>
<meta prefix="og: http://ogp.me/ns#" property="og:url" content="{{ SITEURL }}/{{ article.url }}"/>
<meta prefix="og: http://ogp.me/ns#" property="og:type" content="article"/>
<meta prefix="og: http://ogp.me/ns#" property="article:published_time" content="{{ article.date }}"/>
<meta prefix="og: http://ogp.me/ns#" property="article:modified_time" content="{{ article.modified }}"/>
<meta prefix="og: http://ogp.me/ns#" property="article:author" content="{{ SITEURL }}/{{ article.author.url }}">
{% for name,link in SOCIAL if name.lower() in ['facebook'] %}
<meta property="article:publisher" content="{{ link }}" />
<meta prefix="og: http://ogp.me/ns#" property="article:publisher" content="{{ link }}" />
{% endfor %}
<meta property="article:section" content="{{ article.category.name }}"/>
<meta prefix="og: http://ogp.me/ns#" property="article:section" content="{{ article.category.name }}"/>
{% for tag in article.tags %}
<meta property="article:tag" content="{{ tag.name }}"/>
<meta prefix="og: http://ogp.me/ns#" property="article:tag" content="{{ tag.name }}"/>
{% endfor %}
<meta property="og:image" content="{{ default_cover }}">
<meta prefix="og: http://ogp.me/ns#" property="og:image" content="{{ default_cover }}">

<!-- Twitter Card -->
{% for name,link in SOCIAL if name.lower() in ['twitter'] %}
Expand Down