|
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | 6 | <title>{{ title or metadata.title }}</title> |
7 | 7 | <meta name="description" content="{{ description or metadata.description }}"> |
| 8 | + <link rel="canonical" href="https://rupertmckay.com{{ page.url }}"> |
8 | 9 | <link rel="shortcut icon" type="image/x-icon" href="{{ '/static/favicon.ico' | url }}"> |
9 | 10 | <link rel="stylesheet" href="{{ '/static/styles.css' | url }}"> |
10 | 11 | <link rel="stylesheet" href="{{ '/static/prism.css' | url }}"> |
11 | 12 | <link rel="alternate" type="application/atom+xml" title="{{ metadata.title }}" href="/feed.xml"> |
12 | | - <meta |
13 | | - property="og:description" |
14 | | - content="{{ description or metadata.description }}" |
15 | | - /> |
16 | | - <meta |
17 | | - property="og:image" |
18 | | - content="https://raw.githubusercontent.com/fildon/train-ride/main/train-ride.png" |
19 | | - /> |
| 13 | + |
| 14 | + <!-- Open Graph / Facebook --> |
| 15 | + <meta property="og:type" content="{% if layout == 'layouts/post.njk' %}article{% else %}website{% endif %}" /> |
| 16 | + <meta property="og:url" content="https://rupertmckay.com{{ page.url }}" /> |
| 17 | + <meta property="og:site_name" content="{{ metadata.title }}" /> |
| 18 | + <meta property="og:title" content="{{ title or metadata.title }}" /> |
| 19 | + <meta property="og:description" content="{{ description or metadata.description }}" /> |
| 20 | + <meta property="og:image" content="{{ socialImage or 'https://raw.githubusercontent.com/fildon/train-ride/main/train-ride.png' }}" /> |
20 | 21 | <meta property="og:image:type" content="image/png" /> |
21 | 22 | <meta property="og:image:width" content="1280" /> |
22 | 23 | <meta property="og:image:height" content="640" /> |
| 24 | + {% if layout == 'layouts/post.njk' %} |
| 25 | + <meta property="article:published_time" content="{{ date | htmlDateString }}" /> |
| 26 | + <meta property="article:author" content="{{ metadata.title }}" /> |
| 27 | + {% endif %} |
| 28 | + |
| 29 | + <!-- Twitter --> |
23 | 30 | <meta name="twitter:card" content="summary_large_image" /> |
24 | 31 | <meta property="twitter:domain" content="rupertmckay.com" /> |
25 | | - <meta property="twitter:url" content="https://rupertmckay.com" /> |
| 32 | + <meta property="twitter:url" content="https://rupertmckay.com{{ page.url }}" /> |
26 | 33 | <meta name="twitter:title" content="{{ title or metadata.title }}" /> |
27 | | - <meta |
28 | | - name="twitter:description" |
29 | | - content="{{ description or metadata.description }}" |
30 | | - /> |
31 | | - <meta |
32 | | - name="twitter:image" |
33 | | - content="https://raw.githubusercontent.com/fildon/train-ride/main/train-ride.png" |
34 | | - /> |
| 34 | + <meta name="twitter:description" content="{{ description or metadata.description }}" /> |
| 35 | + <meta name="twitter:image" content="{{ socialImage or 'https://raw.githubusercontent.com/fildon/train-ride/main/train-ride.png' }}" /> |
| 36 | + |
| 37 | + <!-- JSON-LD Structured Data --> |
| 38 | + {% if layout == 'layouts/post.njk' %} |
| 39 | + <script type="application/ld+json"> |
| 40 | + { |
| 41 | + "@context": "https://schema.org", |
| 42 | + "@type": "BlogPosting", |
| 43 | + "headline": "{{ title }}", |
| 44 | + "description": "{{ description or metadata.description }}", |
| 45 | + "author": { |
| 46 | + "@type": "Person", |
| 47 | + "name": "{{ metadata.title }}", |
| 48 | + "url": "https://rupertmckay.com" |
| 49 | + }, |
| 50 | + "datePublished": "{{ date | htmlDateString }}", |
| 51 | + "dateModified": "{{ date | htmlDateString }}", |
| 52 | + "url": "https://rupertmckay.com{{ page.url }}", |
| 53 | + "image": "{{ socialImage or 'https://raw.githubusercontent.com/fildon/train-ride/main/train-ride.png' }}", |
| 54 | + "publisher": { |
| 55 | + "@type": "Person", |
| 56 | + "name": "{{ metadata.title }}", |
| 57 | + "url": "https://rupertmckay.com" |
| 58 | + }, |
| 59 | + "mainEntityOfPage": { |
| 60 | + "@type": "WebPage", |
| 61 | + "@id": "https://rupertmckay.com{{ page.url }}" |
| 62 | + } |
| 63 | + } |
| 64 | + </script> |
| 65 | + {% else %} |
| 66 | + <script type="application/ld+json"> |
| 67 | + { |
| 68 | + "@context": "https://schema.org", |
| 69 | + "@type": "WebSite", |
| 70 | + "name": "{{ metadata.title }}", |
| 71 | + "description": "{{ metadata.description }}", |
| 72 | + "url": "https://rupertmckay.com", |
| 73 | + "author": { |
| 74 | + "@type": "Person", |
| 75 | + "name": "{{ metadata.title }}", |
| 76 | + "url": "https://rupertmckay.com" |
| 77 | + } |
| 78 | + } |
| 79 | + </script> |
| 80 | + {% endif %} |
35 | 81 | </head> |
36 | 82 | <body> |
37 | 83 | <header class="horizontal-spread"> |
38 | 84 | <img |
39 | | - src="../../static/headshot.jpeg" |
| 85 | + src="/static/headshot.jpeg" |
40 | 86 | alt="Headshot of Rupert" |
41 | 87 | class="rounded wonky" |
42 | 88 | height="64" |
|
0 commit comments