mb @ ts
7 years ago
14 changed files with 123 additions and 55 deletions
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 30 KiB |
@ -1,7 +1,9 @@ |
|||||
Title: colophon |
Title: colophon |
||||
slug: colophon |
slug: colophon |
||||
|
|
||||
*Welcome to the � Federation* is a project by [Roel Roscam Abbing](http://roelof.info/), in collaboration with [Manetta Berends](http://manettaberends.nl). |
[*Welcome to the � Federation*](/welcome-to-the-federation.html) is a project by [Roel Roscam Abbing](http://roelof.info/), in collaboration with [Manetta Berends](http://manettaberends.nl). |
||||
|
|
||||
This project is made possible with the support of [Varia](https://varia.zone), [CBK Rotterdam](https://www.cbkrotterdam.nl/). |
|
||||
|
|
||||
|
This project is made possible with the support of [Varia](https://varia.zone) and [CBK Rotterdam](https://www.cbkrotterdam.nl/). |
||||
|
|
||||
|
@ -0,0 +1,59 @@ |
|||||
|
{#This template is for syndicating across the fucked up part of the web. It implements Open Graph and Twitter Card metadata to display links to HBSC well on social media |
||||
|
# This code is mostly taken from Talha Mansoor's Elegant pelican theme https://github.com/talha131/pelican-elegant |
||||
|
#} |
||||
|
|
||||
|
{# Thumbnail image to show when homepage is shared on social media. It also |
||||
|
serves as the default image for posts whose featured_image is not set. #} |
||||
|
{% if not FEATURED_IMAGE %} |
||||
|
{% set FEATURED_IMAGE = 'https://roelof.info/~r/wttf/images/fi.jpg' %} |
||||
|
{% else %} |
||||
|
{% set FEATURED_IMAGE = FEATURED_IMAGE %} |
||||
|
{% endif %} |
||||
|
|
||||
|
|
||||
|
{% macro syndication(article) %} |
||||
|
{% if article %} |
||||
|
<meta property="og:title" content="{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %}"/> |
||||
|
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}" /> |
||||
|
<meta property="og:description" content="{% if article.summary %}{{article.summary|striptags}}{% endif %}" /> |
||||
|
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" /> |
||||
|
<meta property="og:article:author" content="{{ article.author }}" /> |
||||
|
{% if article.date %} |
||||
|
<meta property="og:article:published_time" content="{{ article.date.isoformat() }}" /> |
||||
|
{% endif %} |
||||
|
{% if article.locale_modified and article.modified %} |
||||
|
<meta property="" content="{{ article.modified.isoformat() }}" /> |
||||
|
{% endif %} |
||||
|
<meta name="twitter:title" content="{{ article.title|striptags|e }} {%if article.subtitle %} - {{ article.subtitle|striptags|e }} {% endif %}"> |
||||
|
<meta name="twitter:description" content="{% if article.summary %}{{article.summary|striptags}}{% endif %}"> |
||||
|
{% if article.featured_image %} |
||||
|
<meta name="twitter:card" content="summary_large_image"> |
||||
|
<meta property="og:image" content="{{SITEURL}}/{{article.featured_image}}" /> |
||||
|
<meta property="og:image:secure_url" content="{{SITEURL}}/{{article.featured_image}}" /> |
||||
|
<meta name="twitter:image" content="{{SITEURL}}/{{article.featured_image}}" > |
||||
|
{% else %} |
||||
|
{% if FEATURED_IMAGE %} |
||||
|
<meta property="og:image" content="{{FEATURED_IMAGE}}" /> |
||||
|
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" > |
||||
|
<meta name="twitter:card" content="summary" /> |
||||
|
{% endif %} |
||||
|
{% endif %} |
||||
|
|
||||
|
{% endif %} |
||||
|
{% if not article %} |
||||
|
<meta property="og:title" content="{{ SITENAME|striptags|e }}"/> |
||||
|
<meta name="twitter:title" content="{{ SITENAME|striptags|e }}"> |
||||
|
<meta name="twitter:card" content="summary" /> |
||||
|
<meta property="og:url" content="{{ SITEURL }}" /> |
||||
|
<meta property="og:description" content="{{ SUBTITLE }}"> |
||||
|
<meta property="twitter:description" content=" {{ SUBTITLE }}"> |
||||
|
<meta property="og:site_name" content="{{ SITENAME|striptags|e }}" /> |
||||
|
<meta property="og:article:author" content="{{ AUTHOR }}" /> |
||||
|
{% if FEATURED_IMAGE %} |
||||
|
<meta property="og:image" content="{{FEATURED_IMAGE}}" /> |
||||
|
<meta name="twitter:image" content="{{FEATURED_IMAGE}}" > |
||||
|
{% endif %} |
||||
|
{% endif %} |
||||
|
{% endmacro %}b |
||||
|
|
||||
|
|
Loading…
Reference in new issue