[fastpages] GitHub Pages Blog Using Nbdev

Embarrassingly, I didn’t know about that plugin, so I added this to the template head layout:

  <meta name="twitter:site"    content="@{{ site.twitter_username }}">
  <meta name="twitter:creator" content="@{{ page.author }}">
  <meta name="twitter:title"   content="{{ page.title }}">
  {% if page.summary %}
  <meta name="twitter:description" content="{{ page.summary }}">
  {% else %}
  <meta name="twitter:description" content="{{ site.description }}">
  {% endif %}
  {% if page.image %}
  <meta name="twitter:card"  content="summary_large_image">
  <meta name="twitter:image" content="{{ site.url }}{{ page.image }}">
  {% else %}
  {% endif %}

Since it uses summary, it works with the usual nbdev summary. Although if description is more common, it’s possible nbdev should set that metadata too…