diff --git a/.eleventy.js b/.eleventy.js index 95a777b0..3d17df6d 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -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', diff --git a/package.json b/package.json index 4d4ccef9..29ee868b 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/_data/site.json b/src/_data/site.json index 1a6fd645..49e71daf 100644 --- a/src/_data/site.json +++ b/src/_data/site.json @@ -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", diff --git a/src/_includes/author.liquid b/src/_includes/author.liquid index 783d0cfa..3de6ed33 100644 --- a/src/_includes/author.liquid +++ b/src/_includes/author.liquid @@ -1,6 +1,4 @@ - -
diff --git a/src/_includes/base.liquid b/src/_includes/base.liquid index 04605d17..d14b05e5 100644 --- a/src/_includes/base.liquid +++ b/src/_includes/base.liquid @@ -64,6 +64,9 @@ document.documentElement.classList.remove('dark') } + {{ content }} diff --git a/src/_includes/default.liquid b/src/_includes/default.liquid index 225ffd61..49fe553a 100644 --- a/src/_includes/default.liquid +++ b/src/_includes/default.liquid @@ -6,4 +6,4 @@ layout: main
{{ content }} -
\ No newline at end of file +
diff --git a/src/_includes/post.liquid b/src/_includes/post.liquid index 27eda153..e710afa9 100644 --- a/src/_includes/post.liquid +++ b/src/_includes/post.liquid @@ -15,4 +15,4 @@ layout: main
{% include "webmentions.liquid" %} -{% include "author.liquid" %} \ No newline at end of file +{% include "author.liquid" %} diff --git a/src/about.md b/src/about.md index 2c86eac4..6eaf9425 100644 --- a/src/about.md +++ b/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 ---
diff --git a/src/index.html b/src/index.html index ae7ba94a..5102dbd5 100644 --- a/src/index.html +++ b/src/index.html @@ -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 %} diff --git a/src/now.md b/src/now.md index 59610083..84c55ca2 100644 --- a/src/now.md +++ b/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 --- diff --git a/src/posts/posts.11tydata.js b/src/posts/posts.11tydata.js new file mode 100644 index 00000000..6ca715ab --- /dev/null +++ b/src/posts/posts.11tydata.js @@ -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, + }, + }, +} diff --git a/src/posts/posts.json b/src/posts/posts.json index 0a27d50c..7c97b9b3 100644 --- a/src/posts/posts.json +++ b/src/posts/posts.json @@ -1,5 +1,6 @@ { "layout": "post.liquid", "tags": ["posts"], - "published": true + "published": true, + "type": "post" } diff --git a/src/referrals.md b/src/referrals.md index 1c8fba6c..6f48ec8a 100644 --- a/src/referrals.md +++ b/src/referrals.md @@ -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 ---