Skip to content

Commit

Permalink
Tidy blog post schema
Browse files Browse the repository at this point in the history
  • Loading branch information
csswizardry committed Sep 20, 2024
1 parent 717ee71 commit 88c5129
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', function() {
navigator.serviceWorker.register('/sw.js?0152').then(function(registration) {
navigator.serviceWorker.register('/sw.js?0153').then(function(registration) {
// Successfully registered the Service Worker
//console.log('Service Worker registration successful with scope: ', registration.scope);
}).catch(function(err) {
Expand Down
23 changes: 11 additions & 12 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,20 @@ <h1 itemprop="name headline" elementtiming=page-title style="view-transition-na
"@context": "https://schema.org",
"@type": "BlogPosting",
"url": "{{ site.url }}{{ page.url }}",
"name": {{ page.title | jsonify }},
"headline": {{ page.title | jsonify }},
"keywords": {{ page.tags | join: ',' | jsonify }},
"description": {{ page.meta | jsonify }},
"articleBody": {{ page.content | strip_html | jsonify }},
"datePublished": {{ page.date | jsonify }},
"dateModified": {{ page.last_modified_at | default: page.date | jsonify }},
"name": "{{ page.title }}",
"headline": "{{ page.title }}",
"keywords": "{{ page.tags | join: ',' }}",
"description": "{{ page.meta }}",
"datePublished": "{{ page.date }}",
"dateModified": "{{ page.last_modified_at | default: page.date }}",
"author": {
"@type": "Person",
"url": "{{ site.url }}",
"name": "Harry Roberts"
},
"publisher": {
"@type": "Organization",
"name": {{ site.title | jsonify }},
"name": "{{ site.title }}",
"url": "{{ site.url }}",
"logo": {
"@type": "ImageObject",
Expand Down Expand Up @@ -101,15 +100,15 @@ <h1 itemprop="name headline" elementtiming=page-title style="view-transition-na
"position": 1,
"name": "Blog",
"item": "https://csswizardry.com/archive/"
},{
}, {
"@type": "ListItem",
"position": 2,
"name": {{ page.date | date: "%Y" }},
"name": "{{ page.date | date: "%Y" }}",
"item": "https://csswizardry.com/archive/#year-{{ page.date | date: "%Y" }}"
},{
}, {
"@type": "ListItem",
"position": 3,
"name": {{ page.title | jsonify }},
"name": "{{ page.title }}",
"item": "{{ site.url }}{{ page.url }}"
}]
}
Expand Down
4 changes: 2 additions & 2 deletions sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var cacheName = 'csswizardry:0152';
var cacheName = 'csswizardry:0153';
var cacheFiles = [
'/',
'/about/',
Expand Down Expand Up @@ -63,7 +63,7 @@ self.addEventListener('fetch', function(event) {
// Empty out any caches that don’t match the ones listed.
self.addEventListener('activate', function(event) {

var cacheWhitelist = ['csswizardry:0152'];
var cacheWhitelist = ['csswizardry:0153'];

event.waitUntil(
caches.keys().then(function(cacheNames) {
Expand Down

0 comments on commit 88c5129

Please sign in to comment.