feat: jsonld support

This commit is contained in:
Cory Dransfeldt 2023-05-22 11:55:16 -07:00
parent 5bb5933917
commit 7ea51043d8
No known key found for this signature in database
16 changed files with 144 additions and 5 deletions

View file

@ -2,6 +2,7 @@
"name": "Cory Dransfeldt",
"email": "hi@coryd.dev",
"url": "https://coryd.dev",
"logo": "https://coryd.dev/assets/img/logo.webp",
"title": "Cory Dransfeldt",
"description": "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies.",
"proton": "mailto:hi@coryd.dev",

View file

@ -1,6 +1,4 @@
<!--suppress ALL -->
<div class="mt-12 py-8 border-t-2 flex flex-col md:flex-row justify-between items-center">
<div class="flex flex-col mb-4 md:mb-0 md:flex-row items-center flex-1">
<div class="h-20 w-20">

View file

@ -64,6 +64,9 @@
document.documentElement.classList.remove('dark')
}
</script>
<script>
{% jsonLd meta, type, tags %}
</script>
</head>
<body class="dark:text-white bg-white dark:bg-gray-900 font-sans text-gray-800">
{{ content }}

View file

@ -6,4 +6,4 @@ layout: main
<div class="pt-12 prose dark:prose-invert hover:prose-a:text-blue-500 max-w-full">
{{ content }}
</div>
</div>

View file

@ -15,4 +15,4 @@ layout: main
</div>
</article>
{% include "webmentions.liquid" %}
{% include "author.liquid" %}
{% include "author.liquid" %}

View file

@ -1,6 +1,21 @@
---
layout: default
title: About
meta:
site:
name: 'Cory Dransfeldt'
description: "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies."
url: https://coryd.dev
logo:
src: https://coryd.dev/assets/img/logo.webp
width: 2000
height: 2000
language: en-US
title: 'Cory Dransfeldt • About'
description: 'Husband, dad, developer, music nerd.'
url: https://coryd.dev/about
image:
src: https://coryd.dev/assets/img/avatar.webp
---
<div class="flex items-center justify-center w-full">

View file

@ -5,6 +5,21 @@ pagination:
size: 10
reverse: true
alias: posts
meta:
site:
name: 'Cory Dransfeldt'
description: "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies."
url: https://coryd.dev
logo:
src: https://coryd.dev/assets/img/logo.webp
width: 2000
height: 2000
language: en-US
title: 'Cory Dransfeldt'
description: 'Husband, dad, developer, music nerd.'
url: https://coryd.dev/uses
image:
src: https://coryd.dev/assets/img/avatar.webp
---
{% include "now-topper.liquid" %} {% for post in pagination.items %} {% if post.data.published %}

View file

@ -1,4 +1,19 @@
---
layout: now
title: Now
meta:
site:
name: 'Cory Dransfeldt'
description: "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies."
url: https://coryd.dev
logo:
src: https://coryd.dev/assets/img/logo.webp
width: 2000
height: 2000
language: en-US
title: 'Cory Dransfeldt • Now'
description: "See what I'm doing now."
url: https://coryd.dev/now
image:
src: https://coryd.dev/assets/img/avatar.webp
---

View file

@ -0,0 +1,32 @@
const { getFirstAttachment } = require('../../config/filters')
const md = require('markdown-it')()
const str = require('string-strip-html')
module.exports = {
eleventyComputed: {
meta: {
site: {
name: 'Cory Dransfeldt',
description:
"I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies.",
url: 'https://coryd.dev',
logo: {
src: 'https://coryd.dev/assets/img/logo.webp',
width: 2000,
height: 2000,
},
},
language: 'en-US',
title: (data) => data.title,
description: (data) => str.stripHtml(md.render(data.post_excerpt)).result,
url: (data) => data.url,
image: {
src: (data) => data.post | getFirstAttachment,
},
author: {
name: 'Cory Dransfeldt',
},
published: (data) => data.date,
},
},
}

View file

@ -1,5 +1,6 @@
{
"layout": "post.liquid",
"tags": ["posts"],
"published": true
"published": true,
"type": "post"
}

View file

@ -1,6 +1,21 @@
---
layout: default
title: Referrals
meta:
site:
name: 'Cory Dransfeldt'
description: "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies."
url: https://coryd.dev
logo:
src: https://coryd.dev/assets/img/logo.webp
width: 2000
height: 2000
language: en-US
title: 'Cory Dransfeldt • Referrals'
description: 'Referral links for services that I use.'
url: https://coryd.dev/referrals
image:
src: https://coryd.dev/assets/img/avatar.webp
---
<h2

View file

@ -1,6 +1,21 @@
---
layout: default
title: Tags
meta:
site:
name: 'Cory Dransfeldt'
description: "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies."
url: https://coryd.dev
logo:
src: https://coryd.dev/assets/img/logo.webp
width: 2000
height: 2000
language: en-US
title: 'Cory Dransfeldt • Tags'
description: 'Browse all of my posts by tag.'
url: https://coryd.dev/tags
image:
src: https://coryd.dev/assets/img/avatar.webp
---
{% for tag in collections.tagList %}

View file

@ -1,6 +1,21 @@
---
layout: default
title: Uses
meta:
site:
name: 'Cory Dransfeldt'
description: "I'm a software developer in Camarillo, California. I enjoy hanging out with my beautiful family and 4 rescue dogs, technology, automation, music, writing, reading and tv and movies."
url: https://coryd.dev
logo:
src: https://coryd.dev/assets/img/logo.webp
width: 2000
height: 2000
language: en-US
title: 'Cory Dransfeldt • Uses'
description: 'Software, tools and services that I use regularly.'
url: https://coryd.dev/uses
image:
src: https://coryd.dev/assets/img/avatar.webp
---
<h2