open graph, twitter and rss link metadata
This commit is contained in:
parent
811a31e34b
commit
3c6d4b348b
3 changed files with 44 additions and 8 deletions
|
|
@ -2,9 +2,12 @@ title: CircuitPython
|
|||
email: justin@adafruit.com
|
||||
description: >-
|
||||
The easiest way to program microcontrollers
|
||||
headline_image: "https://circuitpython.org/assets/images/CircuitPython_Hero.jpg"
|
||||
timezone: America/New_York
|
||||
twitter_username: circuitpython
|
||||
github_username: adafruit
|
||||
baseurl: ""
|
||||
url: "https://circuitpython.org"
|
||||
paginate: 5
|
||||
excerpt_separator: <!--more-->
|
||||
permalink: pretty
|
||||
|
|
|
|||
|
|
@ -1,15 +1,16 @@
|
|||
<head>
|
||||
{% include analytics.html %}
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" href="{{ "/assets/images/favicon.ico" | relative_url }}" type="image/x-icon" />
|
||||
<meta name="msapplication-TileColor" content="#1a1919">
|
||||
<meta name="msapplication-TileImage" content="https://cdn-shop.adafruit.com/static/mstile-144x144.png">
|
||||
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
||||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||
{% include metadata.html %}
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
|
||||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
|
||||
|
||||
<!-- CircuitPython RSS Feed -->
|
||||
<link rel="alternate"
|
||||
type="application/rss+xml"
|
||||
title="CircuitPython news!"
|
||||
href="https://blog.adafruit.com/category/circuitpython/feed/"/>
|
||||
<script src="{{ "/assets/javascript/header_mobile.js" | relative_url }}"></script>
|
||||
</head>
|
||||
|
||||
|
||||
|
|
|
|||
32
_includes/metadata.html
Normal file
32
_includes/metadata.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" href="{{ "/assets/images/favicon.ico" | relative_url }}" type="image/x-icon" />
|
||||
<meta name="msapplication-TileColor" content="#1a1919">
|
||||
<meta name="msapplication-TileImage" content="https://cdn-shop.adafruit.com/static/mstile-144x144.png">
|
||||
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
|
||||
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
|
||||
|
||||
<!-- Twitter and Open Graph cards -->
|
||||
<meta name="twitter:site" content="@{{ site.twitter_username }}">
|
||||
<meta property="og:url" content="{{ page.url | absolute_url }}">
|
||||
{% if page.title %}
|
||||
<meta property="og:title" content="{{ page.title }}">
|
||||
{% else %}
|
||||
<meta property="og:title" content="{{ site.title }}">
|
||||
{% endif %}
|
||||
|
||||
{% if page.excerpt %}
|
||||
<meta property="og:description" content="{{ page.excerpt | strip_html | strip_newlines | truncate: 300 }}">
|
||||
{% else %}
|
||||
<meta property="og:description" content="{{ site.description }}">
|
||||
{% endif %}
|
||||
|
||||
{% if page.board_image %}
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta property="og:image" content="{{ "/assets/images/boards/large/" | append: page.board_image | absolute_url }}">
|
||||
{% else %}
|
||||
<meta name="twitter:card" content="summary"></meta>
|
||||
<meta property="og:image" content="{{ site.headline_image }}">
|
||||
{% endif %}
|
||||
<meta property="og:type" content="website" />
|
||||
Loading…
Reference in a new issue