feat: jsonld support
This commit is contained in:
parent
5bb5933917
commit
7ea51043d8
16 changed files with 144 additions and 5 deletions
|
@ -2,6 +2,7 @@ const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight')
|
|||
const heroIcons = require('eleventy-plugin-heroicons')
|
||||
const pluginUnfurl = require('eleventy-plugin-unfurl')
|
||||
const pluginFilesMinifier = require('@sherby/eleventy-plugin-files-minifier')
|
||||
const schema = require('@quasibit/eleventy-plugin-schema')
|
||||
const markdownIt = require('markdown-it')
|
||||
const markdownItAnchor = require('markdown-it-anchor')
|
||||
const markdownItFootnote = require('markdown-it-footnote')
|
||||
|
@ -20,6 +21,7 @@ module.exports = function (eleventyConfig) {
|
|||
eleventyConfig.addPlugin(heroIcons)
|
||||
eleventyConfig.addPlugin(pluginUnfurl)
|
||||
eleventyConfig.addPlugin(pluginFilesMinifier)
|
||||
eleventyConfig.addPlugin(schema)
|
||||
eleventyConfig.addPlugin(activityPubPlugin, {
|
||||
username: 'hi',
|
||||
domain: 'coryd.dev',
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
"@commitlint/cli": "^17.6.3",
|
||||
"@commitlint/config-conventional": "^17.6.3",
|
||||
"@extractus/feed-extractor": "^6.2.2",
|
||||
"@quasibit/eleventy-plugin-schema": "^1.11.0",
|
||||
"@sherby/eleventy-plugin-files-minifier": "^1.1.1",
|
||||
"@tailwindcss/aspect-ratio": "^0.4.2",
|
||||
"@tailwindcss/typography": "^0.5.1",
|
||||
|
@ -54,6 +55,7 @@
|
|||
"markdown-it-footnote": "^3.0.3",
|
||||
"markdownlint-cli": "^0.34.0",
|
||||
"marked": "^5.0.2",
|
||||
"string-strip-html": "8.5.0",
|
||||
"tailwindcss": "^3.3.2"
|
||||
},
|
||||
"lint-staged": {
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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 }}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -15,4 +15,4 @@ layout: main
|
|||
</div>
|
||||
</article>
|
||||
{% include "webmentions.liquid" %}
|
||||
{% include "author.liquid" %}
|
||||
{% include "author.liquid" %}
|
||||
|
|
15
src/about.md
15
src/about.md
|
@ -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">
|
||||
|
|
|
@ -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 %}
|
||||
|
|
15
src/now.md
15
src/now.md
|
@ -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
|
||||
---
|
||||
|
|
32
src/posts/posts.11tydata.js
Normal file
32
src/posts/posts.11tydata.js
Normal 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,
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"layout": "post.liquid",
|
||||
"tags": ["posts"],
|
||||
"published": true
|
||||
"published": true,
|
||||
"type": "post"
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
15
src/tags.md
15
src/tags.md
|
@ -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 %}
|
||||
|
|
15
src/uses.md
15
src/uses.md
|
@ -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
|
||||
|
|
10
yarn.lock
10
yarn.lock
|
@ -558,6 +558,11 @@
|
|||
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
|
||||
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
|
||||
|
||||
"@quasibit/eleventy-plugin-schema@^1.11.0":
|
||||
version "1.11.0"
|
||||
resolved "https://registry.yarnpkg.com/@quasibit/eleventy-plugin-schema/-/eleventy-plugin-schema-1.11.0.tgz#5184dd828a52d5cfb906834f52d925eed84f1b5d"
|
||||
integrity sha512-1nsAS+N8gY3VyUrGHEgSoQHa1kKgyexMHe5BFCK5QXYqLd/AP9IiBLZMYIf0HjQfuVvBeY8s/y4/HqhLuBPpkw==
|
||||
|
||||
"@sherby/eleventy-plugin-files-minifier@^1.1.1":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@sherby/eleventy-plugin-files-minifier/-/eleventy-plugin-files-minifier-1.1.1.tgz#f5506be12051f067114fc6e54af26c234e5f6cce"
|
||||
|
@ -5189,6 +5194,11 @@ string-argv@^0.3.1:
|
|||
resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da"
|
||||
integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==
|
||||
|
||||
string-strip-html@8.5.0:
|
||||
version "8.5.0"
|
||||
resolved "https://registry.yarnpkg.com/string-strip-html/-/string-strip-html-8.5.0.tgz#5e239fe84016fad7b33ca02d23c591f1ccb6af75"
|
||||
integrity sha512-5ICsK1B1j0A3AF1d45m0sqQCcmi1Q+t1QpF+b794LO5FTHV+ITkGR5C+UCDJQZgs5LMuRruqr6j48PxQVIurJQ==
|
||||
|
||||
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
|
|
Reference in a new issue