chore: simpler is better sometimes

This commit is contained in:
Cory Dransfeldt 2023-12-11 11:46:32 -08:00
parent 1238d96483
commit 53d2cee7ce
No known key found for this signature in database
4 changed files with 45 additions and 46 deletions

View file

@ -8,8 +8,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="{{ fullUrl }}" />
<meta property="og:title" content="{% if title %}{{ title }} • {% endif %}{{meta.siteName}}" />
<meta name="description" content="{% if excerpt %}{{ excerpt}}{% else %}{{ meta.siteDescription }}{% endif %}" />
<meta property="og:description" content="{% if excerpt %}{{ excerpt}}{% else %}{{ meta.siteDescription }}{% endif %}" />
<meta name="description" content="{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}" />
<meta property="og:description" content="{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}" />
<meta property="og:type" content="article" />
<meta property="og:url" content="{{ fullUrl }}" />
<meta property="og:image" content="{{ image | getPostImage }}">
@ -52,9 +52,49 @@
title="Cory Dransfeldt's activity feed"
type="application/rss+xml">
{% if schema == 'blog' %}
{% render "schemas/blogpost-schema.liquid", meta: meta, page: page %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage"
},
"isPartOf": {
"@id": "{{ meta.url }}#website"
},
"@id": "{{ fullUrl }}",
"headline": "{%- if title %}{{ title }} • {% endif -%}{{ meta.siteName }}",
"description": "{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}",
"image": "{% if image %}{{ image }}{% else %}{{ meta.meta_data.opengraph_default }}{% endif %}",
"inLanguage": "{{ meta.locale }}",
"publisher": {
"@type": "{{ meta.siteType }}",
"name": "{{ meta.author }}",
"url": "{{ meta.url }}"
},
"author": {
"@type": "Person",
"name": "{{ meta.author }}"
},
"datePublished": "{{ page.date | isoDateOnly }}"
}
</script>
{% else %}
{% render "schemas/base-schema.liquid", meta: meta, page: page %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "{{ meta.url }}#website",
"url": "{{ meta.url }}",
"name": "{%- if title %}{{ title }} • {% endif -%}{{ meta.siteName }}",
"description": "{% if description %}{{ description }}{% else %}{{ meta.siteDescription }}{% endif %}",
"inLanguage": "{{ meta.locale }}"
}
]
}
</script>
{% endif %}
<script defer data-domain="coryd.dev" src="/js/script.js"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>

View file

@ -1,15 +0,0 @@
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "{{ meta.url }}#website",
"url": "{{ meta.url }}",
"name": "{{ meta.siteName }}",
"description": "{% if page.description %}{{ page.description }}{% else %}{{ meta.siteDescription }}{% endif %}",
"inLanguage": "{{ meta.locale }}"
}
]
}
</script>

View file

@ -1,27 +0,0 @@
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"mainEntityOfPage": {
"@type": "WebPage"
},
"isPartOf": {
"@id": "{{ meta.url }}#website"
},
"@id": "{{ page.url }}",
"headline": "{{ page.title or meta.siteName }}",
"description": "{% if page.description %}{{ page.description }}{% else %}{{ meta.siteDescription }}{% endif %}",
"image": "{% if page.image %}{{ page.image }}{% else %}{{ meta.meta_data.opengraph_default }}{% endif %}",
"inLanguage": "{{ meta.locale }}",
"publisher": {
"@type": "{{ meta.siteType }}",
"name": "{{ meta.author }}",
"url": "{{ meta.url }}"
},
"author": {
"@type": "Person",
"name": "{{ meta.author }}"
},
"datePublished": "{{ page.date | isoDateOnly }}"
}
</script>

View file

@ -1,5 +1,6 @@
---
title: 'Programmatically importing your Last.fm listening data to ListenBrainz'
description: 'I love Last.fm, but in the interest of redundancy, Ive started programmatically importing my listening data from Last.fm into ListenBrainz.'
date: '2023-12-05'
draft: false
tags: