22 < meta charset ="utf-8 ">
33 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
44 < title > {% if title %}{{ title }} | {% endif %}{{ metadata.title }}</ title >
5- < meta name ="description " content ="{{ metadata.description }} ">
5+
6+ <!-- SEO Meta Tags -->
7+ {% assign pageDescription = blurb | default: metadata.description %}
8+ {% assign pageTitle = title | default: metadata.title %}
9+ {% assign canonicalUrl = metadata.baseURL | append: page.url %}
10+ {% if image %}{% assign imageUrl = metadata.baseURL | append: image %}{% endif %}
11+ < meta name ="description " content ="{{ pageDescription }} ">
12+ < link rel ="canonical " href ="{{ canonicalUrl }} ">
13+ < meta name ="author " content ="{{ metadata.name }} ">
614 < meta name ="google-site-verification " content ="6TWQ5Bn6LQn9UJ3mgt1nIDIsdvIsPOilhHuWvy5S5kY " />
715
16+ <!-- Open Graph -->
17+ < meta property ="og:title " content ="{{ pageTitle }} ">
18+ < meta property ="og:description " content ="{{ pageDescription }} ">
19+ < meta property ="og:url " content ="{{ canonicalUrl }} ">
20+ < meta property ="og:site_name " content ="{{ metadata.title }} ">
21+ < meta property ="og:locale " content ="{{ metadata.language | replace: '-', '_' }} ">
22+ {% if tags contains 'blog' or tags contains 'research' or tags contains 'writings' or tags contains 'microblog' %}< meta property ="og:type " content ="article ">
23+ {% if date %}< meta property ="article:published_time " content ="{{ date | date: '%Y-%m-%dT%H:%M:%S+00:00' }} "> {% endif %}
24+ < meta property ="article:author " content ="{{ metadata.name }} ">
25+ {% else %}< meta property ="og:type " content ="website ">
26+ {% endif %}{% if image %}< meta property ="og:image " content ="{{ imageUrl }} ">
27+ {% if alt %}< meta property ="og:image:alt " content ="{{ alt }} "> {% endif %}
28+ {% endif %}
29+
30+ <!-- Twitter Card -->
31+ < meta name ="twitter:card " content ="summary ">
32+ < meta name ="twitter:title " content ="{{ pageTitle }} ">
33+ < meta name ="twitter:description " content ="{{ pageDescription }} ">
34+ {% if image %}< meta name ="twitter:image " content ="{{ imageUrl }} ">
35+ {% if alt %}< meta name ="twitter:image:alt " content ="{{ alt }} "> {% endif %}
36+ {% endif %}
37+
838 <!-- Theme init: must load synchronously before CSS to prevent flash -->
939 < script src ="/_scripts/theme-init.js "> </ script >
1040
3161 } ;
3262 </ script >
3363
34- </ head >
64+ <!-- JSON-LD Structured Data -->
65+ < script type ="application/ld+json ">
66+ {
67+ "@context" : "https://schema.org" ,
68+ "@type" : "WebSite" ,
69+ "name" : "{{ metadata.title }}" ,
70+ "url" : "{{ metadata.baseURL }}" ,
71+ "description" : "{{ metadata.description }}" ,
72+ "author" : {
73+ "@type" : "Person" ,
74+ "name" : "{{ metadata.name }}" ,
75+ "url" : "{{ metadata.baseURL }}"
76+ }
77+ }
78+ </ script >
79+ {% if tags contains 'blog' or tags contains 'research' or tags contains 'writings' %}
80+ < script type ="application/ld+json ">
81+ {
82+ "@context" : "https://schema.org" ,
83+ "@type" : "Article" ,
84+ "headline" : "{{ title }}" ,
85+ "description" : "{{ pageDescription }}" ,
86+ "url" : "{{ canonicalUrl }}" ,
87+ "datePublished" : "{{ date | date: '%Y-%m-%dT%H:%M:%S+00:00' }}" ,
88+ "author" : {
89+ "@type" : "Person" ,
90+ "name" : "{{ metadata.name }}" ,
91+ "url" : "{{ metadata.baseURL }}"
92+ } ,
93+ "publisher" : {
94+ "@type" : "Person" ,
95+ "name" : "{{ metadata.name }}" ,
96+ "url" : "{{ metadata.baseURL }}"
97+ } { % if image % } ,
98+ "image" : "{{ imageUrl }}" { % endif % }
99+ }
100+ </ script >
101+ {% elsif tags contains 'microblog' %}
102+ < script type ="application/ld+json ">
103+ {
104+ "@context" : "https://schema.org" ,
105+ "@type" : "BlogPosting" ,
106+ "headline" : "{{ title }}" ,
107+ "description" : "{{ pageDescription }}" ,
108+ "url" : "{{ canonicalUrl }}" ,
109+ "datePublished" : "{{ date | date: '%Y-%m-%dT%H:%M:%S+00:00' }}" ,
110+ "author" : {
111+ "@type" : "Person" ,
112+ "name" : "{{ metadata.name }}" ,
113+ "url" : "{{ metadata.baseURL }}"
114+ } { % if image % } ,
115+ "image" : "{{ imageUrl }}" { % endif % }
116+ }
117+ </ script >
118+ {% endif %}
119+
120+ </ head >
0 commit comments