chore: cleanup and refactor

This commit is contained in:
Cory Dransfeldt 2023-12-11 11:00:39 -08:00
parent b6fb54ab98
commit 5295a6eacc
No known key found for this signature in database
37 changed files with 285 additions and 356 deletions

View file

@ -1,7 +1,6 @@
const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight') const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight')
const tablerIcons = require('eleventy-plugin-tabler-icons') const tablerIcons = require('eleventy-plugin-tabler-icons')
const pluginUnfurl = require('eleventy-plugin-unfurl') const pluginUnfurl = require('eleventy-plugin-unfurl')
const pluginFilesMinifier = require('@sherby/eleventy-plugin-files-minifier')
const schema = require('@quasibit/eleventy-plugin-schema') const schema = require('@quasibit/eleventy-plugin-schema')
const pluginRss = require('@11ty/eleventy-plugin-rss') const pluginRss = require('@11ty/eleventy-plugin-rss')
const embedYouTube = require('eleventy-plugin-youtube-embed') const embedYouTube = require('eleventy-plugin-youtube-embed')
@ -33,7 +32,6 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPlugin(syntaxHighlight) eleventyConfig.addPlugin(syntaxHighlight)
eleventyConfig.addPlugin(tablerIcons) eleventyConfig.addPlugin(tablerIcons)
eleventyConfig.addPlugin(pluginUnfurl) eleventyConfig.addPlugin(pluginUnfurl)
eleventyConfig.addPlugin(pluginFilesMinifier)
eleventyConfig.addPlugin(schema) eleventyConfig.addPlugin(schema)
eleventyConfig.addPlugin(embedYouTube, { eleventyConfig.addPlugin(embedYouTube, {
modestBranding: true, modestBranding: true,
@ -119,21 +117,24 @@ module.exports = function (eleventyConfig) {
md.use(markdownItFootnote) md.use(markdownItFootnote)
eleventyConfig.setLibrary('md', md) eleventyConfig.setLibrary('md', md)
// filters
eleventyConfig.addLiquidFilter('markdown', (content) => { eleventyConfig.addLiquidFilter('markdown', (content) => {
if (!content) return if (!content) return
return md.render(content) return md.render(content)
}) })
Object.keys(filters).forEach((filterName) => { Object.keys(filters).forEach((filterName) => {
eleventyConfig.addLiquidFilter(filterName, filters[filterName]) eleventyConfig.addLiquidFilter(filterName, filters[filterName])
}) })
eleventyConfig.addLiquidFilter('dateToRfc822', pluginRss.dateToRfc822) eleventyConfig.addLiquidFilter('dateToRfc822', pluginRss.dateToRfc822)
eleventyConfig.addLiquidFilter('absoluteUrl', pluginRss.absoluteUrl) eleventyConfig.addLiquidFilter('absoluteUrl', pluginRss.absoluteUrl)
eleventyConfig.addFilter('cssmin', (code) => new CleanCSS({}).minify(code).styles) eleventyConfig.addFilter('cssmin', (code) => new CleanCSS({}).minify(code).styles)
// shortcodes
eleventyConfig.addShortcode('image', img) eleventyConfig.addShortcode('image', img)
// transforms
eleventyConfig.addPlugin(require('./config/transforms/html-config.js'));
eleventyConfig.on('eleventy.after', () => { eleventyConfig.on('eleventy.after', () => {
execSync(`npx pagefind --site _site --glob "**/*.html"`, { encoding: 'utf-8' }) execSync(`npx pagefind --site _site --glob "**/*.html"`, { encoding: 'utf-8' })
}) })

View file

@ -1,7 +1,6 @@
const { DateTime } = require('luxon') const { DateTime } = require('luxon')
const markdownIt = require('markdown-it') const markdownIt = require('markdown-it')
const { URL } = require('url') const { URL } = require('url')
const marked = require('marked')
const sanitizeHTML = require('sanitize-html') const sanitizeHTML = require('sanitize-html')
const utmPattern = /[?&](utm_[^&=]+=[^&#]*)/gi const utmPattern = /[?&](utm_[^&=]+=[^&#]*)/gi
@ -12,16 +11,9 @@ module.exports = {
trim: (string, limit) => { trim: (string, limit) => {
return string.length <= limit ? string : `${string.slice(0, limit)}...` return string.length <= limit ? string : `${string.slice(0, limit)}...`
}, },
stripIndex: (path) => {
return path.replace('/index.html', '/')
},
mdToHtml: (content) => {
return marked.parse(content)
},
btoa: (string) => { btoa: (string) => {
return btoa(string) return btoa(string)
}, },
dashLower: (string) => string.replace(/\s+/g, '-').toLowerCase(),
encodeAmp: (string) => { encodeAmp: (string) => {
if (!string) return if (!string) return
const pattern = /&(?!(?:[a-zA-Z]+|#[0-9]+|#x[0-9a-fA-F]+);)/g const pattern = /&(?!(?:[a-zA-Z]+|#[0-9]+|#x[0-9a-fA-F]+);)/g
@ -54,7 +46,6 @@ module.exports = {
}, },
webmentionsByUrl: (webmentions, url) => { webmentionsByUrl: (webmentions, url) => {
const allowedTypes = ['mention-of', 'in-reply-to', 'like-of', 'repost-of'] const allowedTypes = ['mention-of', 'in-reply-to', 'like-of', 'repost-of']
const data = { const data = {
'like-of': [], 'like-of': [],
'repost-of': [], 'repost-of': [],

View file

@ -0,0 +1,18 @@
const htmlmin = require('html-minifier-terser')
const isProduction = process.env.ELEVENTY_ENV === 'production'
module.exports = (eleventyConfig) => {
eleventyConfig.addTransform('html-minify', (content, path) => {
if (path && path.endsWith('.html') && isProduction) {
return htmlmin.minify(content, {
collapseBooleanAttributes: true,
collapseWhitespace: true,
decodeEntities: true,
includeAutoGeneratedTags: false,
removeComments: true,
})
}
return content
})
}

181
package-lock.json generated
View file

@ -1,12 +1,12 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "2.3.1", "version": "2.5.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coryd.dev", "name": "coryd.dev",
"version": "2.3.1", "version": "2.5.3",
"license": "ISC", "license": "ISC",
"devDependencies": { "devDependencies": {
"@11ty/eleventy": "^2.0.1", "@11ty/eleventy": "^2.0.1",
@ -19,7 +19,6 @@
"@commitlint/cli": "^18.4.3", "@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3", "@commitlint/config-conventional": "^18.4.3",
"@quasibit/eleventy-plugin-schema": "^1.11.0", "@quasibit/eleventy-plugin-schema": "^1.11.0",
"@sherby/eleventy-plugin-files-minifier": "^1.1.1",
"@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/line-clamp": "^0.4.4", "@tailwindcss/line-clamp": "^0.4.4",
"@tailwindcss/typography": "^0.5.10", "@tailwindcss/typography": "^0.5.10",
@ -36,6 +35,7 @@
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.8.0", "eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.0.1", "eslint-plugin-prettier": "^5.0.1",
"html-minifier-terser": "^7.2.0",
"husky": "^8.0.3", "husky": "^8.0.3",
"ics-to-json-extended": "^1.1.4", "ics-to-json-extended": "^1.1.4",
"jsdom": "^23.0.1", "jsdom": "^23.0.1",
@ -1037,6 +1037,16 @@
"node": ">=6.0.0" "node": ">=6.0.0"
} }
}, },
"node_modules/@jridgewell/source-map": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz",
"integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==",
"dev": true,
"dependencies": {
"@jridgewell/gen-mapping": "^0.3.0",
"@jridgewell/trace-mapping": "^0.3.9"
}
},
"node_modules/@jridgewell/sourcemap-codec": { "node_modules/@jridgewell/sourcemap-codec": {
"version": "1.4.15", "version": "1.4.15",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
@ -1201,16 +1211,6 @@
"@11ty/eleventy": "^0.11.0 || ^0.12.0 || ^1.0.0 || ^2.0.0" "@11ty/eleventy": "^0.11.0 || ^0.12.0 || ^1.0.0 || ^2.0.0"
} }
}, },
"node_modules/@sherby/eleventy-plugin-files-minifier": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@sherby/eleventy-plugin-files-minifier/-/eleventy-plugin-files-minifier-1.1.1.tgz",
"integrity": "sha512-3gVtq4H6IJ3/l4mRsTHAOG/5AY8NXgXd0w1EXaXImzEThAOQ++/Mr95dF9u9wTCmmv+57SeG62/tJibtyL8JRA==",
"dev": true,
"dependencies": {
"html-minifier": "^4.0.0",
"pretty-data": "^0.40.0"
}
},
"node_modules/@sindresorhus/slugify": { "node_modules/@sindresorhus/slugify": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-1.1.2.tgz", "resolved": "https://registry.npmjs.org/@sindresorhus/slugify/-/slugify-1.1.2.tgz",
@ -2361,6 +2361,12 @@
"ieee754": "^1.1.13" "ieee754": "^1.1.13"
} }
}, },
"node_modules/buffer-from": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
"dev": true
},
"node_modules/bundle-name": { "node_modules/bundle-name": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz",
@ -2408,13 +2414,13 @@
} }
}, },
"node_modules/camel-case": { "node_modules/camel-case": {
"version": "3.0.0", "version": "4.1.2",
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
"integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==", "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"no-case": "^2.2.0", "pascal-case": "^3.1.2",
"upper-case": "^1.1.1" "tslib": "^2.0.3"
} }
}, },
"node_modules/camelcase": { "node_modules/camelcase": {
@ -3572,6 +3578,16 @@
"url": "https://github.com/fb55/domutils?sponsor=1" "url": "https://github.com/fb55/domutils?sponsor=1"
} }
}, },
"node_modules/dot-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
"integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
"dev": true,
"dependencies": {
"no-case": "^3.0.4",
"tslib": "^2.0.3"
}
},
"node_modules/dot-prop": { "node_modules/dot-prop": {
"version": "5.3.0", "version": "5.3.0",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
@ -5309,15 +5325,6 @@
"node": ">= 0.4" "node": ">= 0.4"
} }
}, },
"node_modules/he": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
"dev": true,
"bin": {
"he": "bin/he"
}
},
"node_modules/hosted-git-info": { "node_modules/hosted-git-info": {
"version": "4.1.0", "version": "4.1.0",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz",
@ -5342,37 +5349,34 @@
"node": ">=18" "node": ">=18"
} }
}, },
"node_modules/html-minifier": { "node_modules/html-minifier-terser": {
"version": "4.0.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz", "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz",
"integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==", "integrity": "sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"camel-case": "^3.0.0", "camel-case": "^4.1.2",
"clean-css": "^4.2.1", "clean-css": "~5.3.2",
"commander": "^2.19.0", "commander": "^10.0.0",
"he": "^1.2.0", "entities": "^4.4.0",
"param-case": "^2.1.1", "param-case": "^3.0.4",
"relateurl": "^0.2.7", "relateurl": "^0.2.7",
"uglify-js": "^3.5.1" "terser": "^5.15.1"
}, },
"bin": { "bin": {
"html-minifier": "cli.js" "html-minifier-terser": "cli.js"
}, },
"engines": { "engines": {
"node": ">=6" "node": "^14.13.1 || >=16.0.0"
} }
}, },
"node_modules/html-minifier/node_modules/clean-css": { "node_modules/html-minifier-terser/node_modules/commander": {
"version": "4.2.4", "version": "10.0.1",
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz",
"integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==",
"dev": true, "dev": true,
"dependencies": {
"source-map": "~0.6.0"
},
"engines": { "engines": {
"node": ">= 4.0" "node": ">=14"
} }
}, },
"node_modules/htmlparser2": { "node_modules/htmlparser2": {
@ -7309,10 +7313,13 @@
} }
}, },
"node_modules/lower-case": { "node_modules/lower-case": {
"version": "1.1.4", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
"integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==", "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
"dev": true "dev": true,
"dependencies": {
"tslib": "^2.0.3"
}
}, },
"node_modules/lru-cache": { "node_modules/lru-cache": {
"version": "6.0.0", "version": "6.0.0",
@ -7867,12 +7874,13 @@
"dev": true "dev": true
}, },
"node_modules/no-case": { "node_modules/no-case": {
"version": "2.3.2", "version": "3.0.4",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
"integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"lower-case": "^1.1.1" "lower-case": "^2.0.2",
"tslib": "^2.0.3"
} }
}, },
"node_modules/node-abi": { "node_modules/node-abi": {
@ -8324,12 +8332,13 @@
} }
}, },
"node_modules/param-case": { "node_modules/param-case": {
"version": "2.1.1", "version": "3.0.4",
"resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
"integrity": "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==", "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"no-case": "^2.2.0" "dot-case": "^3.0.4",
"tslib": "^2.0.3"
} }
}, },
"node_modules/parent-module": { "node_modules/parent-module": {
@ -8389,6 +8398,16 @@
"node": ">= 0.8" "node": ">= 0.8"
} }
}, },
"node_modules/pascal-case": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
"integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
"dev": true,
"dependencies": {
"no-case": "^3.0.4",
"tslib": "^2.0.3"
}
},
"node_modules/path-exists": { "node_modules/path-exists": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@ -8911,15 +8930,6 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/pretty-data": {
"version": "0.40.0",
"resolved": "https://registry.npmjs.org/pretty-data/-/pretty-data-0.40.0.tgz",
"integrity": "sha512-YFLnEdDEDnkt/GEhet5CYZHCvALw6+Elyb/tp8kQG03ZSIuzeaDWpZYndCXwgqu4NAjh1PI534dhDS1mHarRnQ==",
"dev": true,
"engines": {
"node": "*"
}
},
"node_modules/prismjs": { "node_modules/prismjs": {
"version": "1.29.0", "version": "1.29.0",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz", "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz",
@ -10401,6 +10411,16 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/source-map-support": {
"version": "0.5.21",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
"integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
"dev": true,
"dependencies": {
"buffer-from": "^1.0.0",
"source-map": "^0.6.0"
}
},
"node_modules/spdx-correct": { "node_modules/spdx-correct": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
@ -10916,6 +10936,24 @@
"streamx": "^2.15.0" "streamx": "^2.15.0"
} }
}, },
"node_modules/terser": {
"version": "5.26.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.26.0.tgz",
"integrity": "sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ==",
"dev": true,
"dependencies": {
"@jridgewell/source-map": "^0.3.3",
"acorn": "^8.8.2",
"commander": "^2.20.0",
"source-map-support": "~0.5.20"
},
"bin": {
"terser": "bin/terser"
},
"engines": {
"node": ">=10"
}
},
"node_modules/text-extensions": { "node_modules/text-extensions": {
"version": "2.4.0", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz",
@ -11289,6 +11327,7 @@
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
"integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==",
"dev": true, "dev": true,
"optional": true,
"bin": { "bin": {
"uglifyjs": "bin/uglifyjs" "uglifyjs": "bin/uglifyjs"
}, },
@ -11374,12 +11413,6 @@
"browserslist": ">= 4.21.0" "browserslist": ">= 4.21.0"
} }
}, },
"node_modules/upper-case": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz",
"integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA==",
"dev": true
},
"node_modules/uri-js": { "node_modules/uri-js": {
"version": "4.4.1", "version": "4.4.1",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "2.5.3", "version": "2.6.0",
"description": "The source for my personal site, blog and portfolio. Built using 11ty and hosted on Netlify.", "description": "The source for my personal site, blog and portfolio. Built using 11ty and hosted on Netlify.",
"main": "index.html", "main": "index.html",
"scripts": { "scripts": {
@ -28,12 +28,11 @@
"@commitlint/cli": "^18.4.3", "@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3", "@commitlint/config-conventional": "^18.4.3",
"@quasibit/eleventy-plugin-schema": "^1.11.0", "@quasibit/eleventy-plugin-schema": "^1.11.0",
"@sherby/eleventy-plugin-files-minifier": "^1.1.1",
"@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/line-clamp": "^0.4.4", "@tailwindcss/line-clamp": "^0.4.4",
"@tailwindcss/typography": "^0.5.10", "@tailwindcss/typography": "^0.5.10",
"@typescript-eslint/parser": "^6.13.2",
"@typescript-eslint/eslint-plugin": "^6.13.2", "@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.13.2",
"autoprefixer": "^10.4.16", "autoprefixer": "^10.4.16",
"child_process": "^1.0.2", "child_process": "^1.0.2",
"clean-css": "^5.3.3", "clean-css": "^5.3.3",
@ -45,6 +44,7 @@
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.8.0", "eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.0.1", "eslint-plugin-prettier": "^5.0.1",
"html-minifier-terser": "^7.2.0",
"husky": "^8.0.3", "husky": "^8.0.3",
"ics-to-json-extended": "^1.1.4", "ics-to-json-extended": "^1.1.4",
"jsdom": "^23.0.1", "jsdom": "^23.0.1",

16
src/_data/meta.js Normal file
View file

@ -0,0 +1,16 @@
module.exports = {
siteName: 'Cory Dransfeldt',
siteDescription:
"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.",
author: 'Cory Dransfeldt',
authorEmail: 'cory.dransfeldt@gmail.com',
authorWebsite: 'https://coryd.dev',
themeColor: '#3b82f6',
url: process.env.URL || 'http://localhost:8080',
siteType: 'Person',
locale: 'en_US',
lang: 'en',
meta_data: {
opengraph_default: 'https://coryd.dev/assets/img/logo.webp',
},
}

View file

@ -1,11 +0,0 @@
module.exports = async function () {
return {
name: 'Cory Dransfeldt',
email: 'cory.dransfeldt@gmail.com',
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.",
}
}

View file

@ -1,5 +1,5 @@
{%- capture fullUrl %} {%- capture fullUrl %}
{{ site.url }}{{ page.url }}{% endcapture -%} {{ meta.url }}{{ page.url }}{% endcapture -%}
<!doctype html> <!doctype html>
<html class="scrollbar-thin scrollbar-thumb-blue-600 dark:scrollbar-thumb-blue-400 scrollbar-track-blue-100" lang="en"> <html class="scrollbar-thin scrollbar-thumb-blue-600 dark:scrollbar-thumb-blue-400 scrollbar-track-blue-100" lang="en">
<head> <head>
@ -7,17 +7,17 @@
{% if title %} {% if title %}
{{ title }} • {{ title }} •
{% endif %} {% endif %}
{{ site.title }}</title> {{ meta.siteName }}</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="{{ fullUrl }}" /> <link rel="canonical" href="{{ fullUrl }}" />
<meta property="og:title" content="{% if title %}{{ title }} • {% endif %}{{site.title}}" /> <meta property="og:title" content="{% if title %}{{ title }} • {% endif %}{{meta.title}}" />
<meta name="description" content="{% if excerpt %}{{ excerpt}}{% else %}{{ site.description }}{% endif %}" /> <meta name="description" content="{% if excerpt %}{{ excerpt}}{% else %}{{ meta.siteDescription }}{% endif %}" />
<meta property="og:description" content="{% if excerpt %}{{ excerpt}}{% else %}{{ site.description }}{% endif %}" /> <meta property="og:description" content="{% if excerpt %}{{ excerpt}}{% else %}{{ meta.siteDescription }}{% endif %}" />
<meta property="og:type" content="article" /> <meta property="og:type" content="article" />
<meta property="og:url" content="{{ fullUrl }}" /> <meta property="og:url" content="{{ fullUrl }}" />
<meta property="og:image" content="{{ image | getPostImage }}"> <meta property="og:image" content="{{ image | getPostImage }}">
<meta name="theme-color" content="#3b82f6" /> <meta name="theme-color" content="{{ meta.themeColor }}" />
<meta name="generator" content="{{ eleventy.generator }}"> <meta name="generator" content="{{ eleventy.generator }}">
<meta name="robots" content="noai, noimageai"> <meta name="robots" content="noai, noimageai">
<link <link
@ -55,9 +55,11 @@
href="https://feedpress.me/coryd-follow" href="https://feedpress.me/coryd-follow"
title="Cory Dransfeldt's activity feed" title="Cory Dransfeldt's activity feed"
type="application/rss+xml"> type="application/rss+xml">
<script type="application/ld+json"> {% if schema == 'blog' %}
{% jsonLd meta, type, tags %} {% render "schemas/blogpost-schema.liquid", meta: meta, page: page %}
</script> {% else %}
{% render "schemas/base-schema.liquid", meta: meta, page: page %}
{% endif %}
<script defer data-domain="coryd.dev" src="/js/script.js"></script> <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> <script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
<noscript> <noscript>

View file

@ -1,7 +1,7 @@
--- ---
layout: main layout: main
--- ---
{% render "partials/header.liquid", site: site, page: page, nav: nav %} {% render "partials/header.liquid", meta: meta, page: page, nav: nav %}
<div class="pt-8 prose dark:prose-invert hover:prose-a:text-blue-800 dark:hover:prose-a:text-blue-200 max-w-full"> <div class="pt-8 prose dark:prose-invert hover:prose-a:text-blue-800 dark:hover:prose-a:text-blue-200 max-w-full">
{{ content }} {{ content }}
</div> </div>

View file

@ -1,7 +1,7 @@
--- ---
layout: main layout: main
--- ---
{% render "partials/header.liquid", site: site, page: page, nav: nav %} {% render "partials/header.liquid", meta: meta, page: page, nav: nav %}
{{ content }} {{ content }}
{% render "partials/now/media-grid.liquid", data:artists, icon: "microphone-2", title: "Artists", shape: "square", count: 8, loading: 'eager' %} {% render "partials/now/media-grid.liquid", data:artists, icon: "microphone-2", title: "Artists", shape: "square", count: 8, loading: 'eager' %}
{% render "partials/now/media-grid.liquid", data:albums, icon: "vinyl", title: "Albums", shape: "square", count: 8 %} {% render "partials/now/media-grid.liquid", data:albums, icon: "vinyl", title: "Albums", shape: "square", count: 8 %}

View file

@ -1,9 +1,9 @@
<div class="mt-12 py-8 border-t-2 flex flex-col md:flex-row justify-between items-center"> <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="flex flex-col mb-4 md:mb-0 md:flex-row items-center flex-1">
<div class="border border-blue-600 dark:border-blue-400 bg-white rounded-full overflow-hidden mb-4 md:mb-0 md:mr-4 [&>*]:h-20 [&>*]:w-20 flex flex-col items-center"> <div class="border border-blue-600 dark:border-blue-400 bg-white rounded-full overflow-hidden mb-4 md:mb-0 md:mr-4 [&>*]:h-20 [&>*]:w-20 flex flex-col items-center">
{% image './src/assets/img/avatar.webp', site.name, 'inline-block' %} {% image './src/assets/img/avatar.webp', meta.siteName, 'inline-block' %}
</div> </div>
<span class="text-lg font-medium">{{ site.name }}</span> <span class="text-lg font-medium">{{ meta.siteName }}</span>
</div> </div>
<p class="text-sm flex-1">{{ site.description }}</p> <p class="text-sm flex-1">{{ meta.siteDescription }}</p>
</div> </div>

View file

@ -3,8 +3,8 @@
"version": "https://jsonfeed.org/version/1", "version": "https://jsonfeed.org/version/1",
"title": "{{ title }}", "title": "{{ title }}",
"icon": "https://coryd.dev/static/images/avatar.webp", "icon": "https://coryd.dev/static/images/avatar.webp",
"home_page_url": "{{ site.url }}", "home_page_url": "{{ meta.url }}",
"feed_url": "{{ site.url }}{{ permalink }}", "feed_url": "{{ meta.url }}{{ permalink }}",
"items": [{% for entry in entries limit: 20 -%} "items": [{% for entry in entries limit: 20 -%}
{ {
"id": "{{ entry.url | btoa }}", "id": "{{ entry.url | btoa }}",

View file

@ -4,12 +4,12 @@
{% assign entries = data | normalizeEntries -%} {% assign entries = data | normalizeEntries -%}
<title>{{ title }}</title> <title>{{ title }}</title>
<description>{{ description }}</description> <description>{{ description }}</description>
<link>{{ permalink | absoluteUrl: site.url }}</link> <link>{{ permalink | absoluteUrl: meta.url }}</link>
<lastBuildDate>{{ updated }}</lastBuildDate> <lastBuildDate>{{ updated }}</lastBuildDate>
<image> <image>
<title>{{ title }}</title> <title>{{ title }}</title>
<link>{{ permalink | absoluteUrl: site.url }}</link> <link>{{ permalink | absoluteUrl: meta.url }}</link>
<url>{{ site.url }}/assets/icons/feed-icon.png</url> <url>{{ meta.url }}/assets/icons/feed-icon.png</url>
<width>144</width> <width>144</width>
<height>144</height> <height>144</height>
</image> </image>

View file

@ -1,6 +1,6 @@
<div class="flex flex-col md:flex-row md:items-center md:justify-between pt-5 md:pt-10"> <div class="flex flex-col md:flex-row md:items-center md:justify-between pt-5 md:pt-10">
<h1 class="text-2xl md:text-3xl font-black leading-tight pb-5 md:pb-0"> <h1 class="text-2xl md:text-3xl font-black leading-tight pb-5 md:pb-0">
<a class="text-gray-700 dark:text-gray-200" href="/">{{ site.title }}</a> <a class="text-gray-700 dark:text-gray-200" href="/">{{ meta.siteName }}</a>
</h1> </h1>
{% render "partials/nav/menu.liquid", page: page, nav: nav %} {% render "partials/nav/menu.liquid", page: page, nav: nav %}
</div> </div>

View file

@ -1,7 +1,8 @@
--- ---
layout: main layout: main
schema: blog
--- ---
{% render "partials/header.liquid", site: site, page: page, nav: nav %} {% render "partials/header.liquid", meta: meta, page: page, nav: nav %}
<article class="h-entry" data-pagefind-body> <article class="h-entry" data-pagefind-body>
{% if link %} {% if link %}
<a class="no-underline" href="{{ link }}"> <a class="no-underline" href="{{ link }}">
@ -13,7 +14,7 @@ layout: main
{% else %} {% else %}
<h2 class="p-name text-xl md:text-2xl font-black leading-tight dark:text-gray-200 pt-8" data-pagefind-meta="title">{{ title }}</h2> <h2 class="p-name text-xl md:text-2xl font-black leading-tight dark:text-gray-200 pt-8" data-pagefind-meta="title">{{ title }}</h2>
{% endif %} {% endif %}
<span class="p-author h-card hidden">{{ site.title }}</span> <span class="p-author h-card hidden">{{ meta.author }}</span>
<time class="mt-2 mb-6 block text-sm dt-published" datetime="{{ date }}">{{ date | readableDate }}</time> <time class="mt-2 mb-6 block text-sm dt-published" datetime="{{ date }}">{{ date | readableDate }}</time>
<div class="p-summary hidden">{{ post_excerpt | markdown }}</div> <div class="p-summary hidden">{{ post_excerpt | markdown }}</div>
<div class="e-content prose dark:prose-invert hover:prose-a:text-blue-800 dark:hover:prose-a:text-blue-200 max-w-full text-gray-800 dark:text-white"> <div class="e-content prose dark:prose-invert hover:prose-a:text-blue-800 dark:hover:prose-a:text-blue-200 max-w-full text-gray-800 dark:text-white">
@ -22,5 +23,5 @@ layout: main
</article> </article>
{% render "partials/post-tags.liquid", tags: tags %} {% render "partials/post-tags.liquid", tags: tags %}
{% render "partials/webmentions/container.liquid", webmentions: webmentions, page: page %} {% render "partials/webmentions/container.liquid", webmentions: webmentions, page: page %}
{% render "partials/author.liquid", site: site %} {% render "partials/author.liquid", meta: meta %}
{% render "partials/popular-posts.liquid", posts: collections.posts, analytics: analytics %} {% render "partials/popular-posts.liquid", posts: collections.posts, analytics: analytics %}

View file

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

View file

@ -0,0 +1,27 @@
<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

@ -41,7 +41,7 @@ meta:
</h2> </h2>
{% endif %} {% endif %}
</a> </a>
<span class="p-author h-card hidden">{{ site.title }}</span> <span class="p-author h-card hidden">{{ meta.siteName }}</span>
<div class="my-2 text-sm"> <div class="my-2 text-sm">
<time class="dt-published" datetime="{{ post.date }}"> <time class="dt-published" datetime="{{ post.date }}">
{{ post.date | date: "%m.%Y" }} {% if post.data.link %} • <a class="flex-none font-normal no-underline" href="{{ post.url }}">Permalink</a>{% endif %} {{ post.date | date: "%m.%Y" }} {% if post.data.link %} • <a class="flex-none font-normal no-underline" href="{{ post.url }}">Permalink</a>{% endif %}

View file

@ -1,7 +1,7 @@
--- ---
title: '404' title: 404
layout: default layout: default
permalink: 404.html permalink: /404.html
--- ---
{% image './src/assets/img/404.jpg', title, 'border border-blue-600 dark:border-blue-400 rounded-lg overflow-hidden [&>*]:w-full' %} {% image './src/assets/img/404.jpg', title, 'border border-blue-600 dark:border-blue-400 rounded-lg overflow-hidden [&>*]:w-full' %}

View file

@ -1,26 +1,12 @@
--- ---
layout: default
title: About title: About
meta: layout: default
site: permalink: /about.html
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 not-prose mb-6"> <div class="flex items-center justify-center w-full not-prose mb-6">
<div class="border border-blue-600 dark:border-blue-400 bg-white rounded-full overflow-hidden p-4 w-64 h-64 md:w-96 md:h-96 flex items-center [&>*]:w-full [&>*]:h-auto"> <div class="border border-blue-600 dark:border-blue-400 bg-white rounded-full overflow-hidden p-4 w-64 h-64 md:w-96 md:h-96 flex items-center [&>*]:w-full [&>*]:h-auto">
{% capture about_alt %}{{ site.name }} - image by David Neal / @reverentgeek{% endcapture %} {% capture about_alt %}{{ meta.siteName }} - image by David Neal / @reverentgeek{% endcapture %}
{% image './src/assets/img/avatar.webp', about_alt %} {% image './src/assets/img/avatar.webp', about_alt %}
</div> </div>
</div> </div>

View file

@ -1,21 +1,8 @@
--- ---
layout: default
title: Blogroll title: Blogroll
meta: layout: default
site: permalink: /blogroll.html
name: 'Cory Dransfeldt' description: 'These are awesome blogs that I enjoy and you may enjoy too.'
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 • Blogroll'
description: 'These are awesome blogs that I enjoy and you may enjoy too.'
url: https://coryd.dev/blogroll
image:
src: https://coryd.dev/assets/img/avatar.webp
--- ---
<h2 <h2

View file

@ -1,7 +1,7 @@
--- ---
title: 'Success' title: Success
layout: default layout: default
permalink: contact/success.html permalink: /contact/success.html
--- ---
<div class="text-center w-full"> <div class="text-center w-full">

View file

@ -1,21 +1,8 @@
--- ---
layout: default
title: Contact title: Contact
meta: layout: default
site: permalink: /contact.html
name: 'Cory Dransfeldt' description: 'How to contact me.'
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 • Contact'
description: 'How to contact me.'
url: https://coryd.dev/contact
image:
src: https://coryd.dev/assets/img/avatar.webp
--- ---
<h2 <h2
@ -30,7 +17,7 @@ meta:
<ul> <ul>
<li>Ping me on <a href="https://social.lol/@cory">Mastodon</a></li> <li>Ping me on <a href="https://social.lol/@cory">Mastodon</a></li>
<li>Message me on Signal or iMessage (if you have my phone number)</li> <li>Message me on Signal or iMessage (if you have my phone number)</li>
<li><a href="mailto:{{ site.email }}">Email me directly</a> if you have a client set up to use <code>mailto:</code> links</li> <li><a href="mailto:{{ meta.authorEmail }}">Email me directly</a> if you have a client set up to use <code>mailto:</code> links</li>
<li>File an issue on the appropriate repo over at <a href="https://github.com/cdransf">GitHub</a></li> <li>File an issue on the appropriate repo over at <a href="https://github.com/cdransf">GitHub</a></li>
</ul> </ul>
</div> </div>

View file

@ -1,21 +1,8 @@
--- ---
layout: default
title: Feeds title: Feeds
meta: layout: default
site: permalink: /feeds.html
name: 'Cory Dransfeldt' description: 'Content feeds exposed by and generated from my site.'
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 • Feeds'
description: 'Content feeds exposed by and generated from my site.'
url: https://coryd.dev/feeds
image:
src: https://coryd.dev/assets/img/avatar.webp
--- ---
<h2 <h2

View file

@ -1,21 +1,8 @@
--- ---
layout: now
title: Now title: Now
meta: layout: now
site: permalink: /now.html
name: 'Cory Dransfeldt' description: "See what I'm doing now."
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
--- ---
<h2 class="[&>svg]:h-5 [&>svg]:w-5 [&>svg]:md:h-7 [&>svg]:md:w-7 [&>svg]:-mt-1 [&>svg]:md:-mt-1.5 [&>svg]:inline icon--bold m-0 text-xl font-black leading-tight tracking-normal dark:text-gray-200 md:text-2xl mt-8 mb-4"> <h2 class="[&>svg]:h-5 [&>svg]:w-5 [&>svg]:md:h-7 [&>svg]:md:w-7 [&>svg]:-mt-1 [&>svg]:md:-mt-1.5 [&>svg]:inline icon--bold m-0 text-xl font-black leading-tight tracking-normal dark:text-gray-200 md:text-2xl mt-8 mb-4">
{% tablericon "clock-heart" "Currently" %} {% tablericon "clock-heart" "Currently" %}

View file

@ -1,21 +1,8 @@
--- ---
layout: default
title: Referrals title: Referrals
meta: layout: default
site: permalink: /referrals.html
name: 'Cory Dransfeldt' description: 'Referral links for services that I use.'
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 <h2

View file

@ -1,21 +1,7 @@
--- ---
title: /Search
layout: default layout: default
title: Search permalink: /search.html
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 • Search'
description: "Search everything I've posted on my site."
url: https://coryd.dev/search
image:
src: https://coryd.dev/assets/img/avatar.webp
--- ---
<link href="https://coryd.dev/pagefind/pagefind-ui.css" rel="stylesheet" /> <link href="https://coryd.dev/pagefind/pagefind-ui.css" rel="stylesheet" />
@ -37,12 +23,12 @@ meta:
} }
} }
</style> </style>
<div id="search" class="search"></div> <div id="/search" class="/search"></div>
<script <script
src="https://coryd.dev/_pagefind/pagefind-ui.js" src="https://coryd.dev/_pagefind/pagefind-ui.js"
onload="new PagefindUI({ element: '#search', showImages: false, processTerm: (term) => { onload="new PagefindUI({ element: '#/search', showImages: false, processTerm: (term) => {
try{ try{
plausible('Search', {props: {method: 'Text', term}}); plausible('/Search', {props: {method: 'Text', term}});
} catch(e){}; } catch(e){};
return term; return term;
} }

View file

@ -6,7 +6,7 @@ eleventyExcludeFromCollections: true
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{% for page in collections.all %} {% for page in collections.all %}
<url> <url>
<loc>{{ site.url }}{{ page.url | url }}</loc> <loc>{{ meta.url }}{{ page.url | url }}</loc>
<lastmod>{{ page.date }}</lastmod> <lastmod>{{ page.date }}</lastmod>
<changefreq>{{page.data.changeFreq}}</changefreq> <changefreq>{{page.data.changeFreq}}</changefreq>
</url> </url>

14
src/pages/tags.md Normal file
View file

@ -0,0 +1,14 @@
---
title: Tags
layout: default
permalink: /tags.html
---
{% for tag in collections.tagList %}
<span>
<a href="/tags/{{ tag }}" class="!no-underline">
<button class="pill--button">
{{ tag }}
</button>
</a>
</span>
{% endfor %}

View file

@ -1,21 +1,9 @@
--- ---
layout: default
title: Uses title: Uses
meta: layout: default
site: permalink: /uses.html
name: 'Cory Dransfeldt' description: 'Software, tools and services that I use regularly.'
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." image: https://coryd.dev/assets/img/pages/uses.jpg
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/pages/uses.jpg
--- ---
<h2 <h2

18
src/pages/webrings.md Normal file
View file

@ -0,0 +1,18 @@
---
title: Webrings
layout: default
permalink: /webrings.html
description: "Webrings are awesome! These are the ones I'm a member of."
---
<h2
class="m-0 text-xl font-black leading-tight tracking-normal dark:text-gray-200 md:text-2xl mb-2"
>
{{ title }}
</h2>
[Webrings](https://en.wikipedia.org/wiki/Webring) are _awesome_. I'm a member of a few that follow. Check them out!
{% render "webrings/the-claw.liquid" %}
<hr />
{% render "webrings/css-joy.liquid" %}

View file

@ -132,7 +132,7 @@ We use the [liquid.js render tag](https://liquidjs.com/tags/render.html) and pas
--- ---
layout: main layout: main
--- ---
{% render "partials/header.liquid", site: site, page: page, nav: nav %} {% render "partials/header.liquid", meta: meta, page: page, nav: nav %}
{{ content }} {{ content }}
{% render "partials/now/media-grid.liquid", data:artists, icon: "microphone-2", title: "Artists", shape: "square", count: 8, loading: 'eager' %} {% render "partials/now/media-grid.liquid", data:artists, icon: "microphone-2", title: "Artists", shape: "square", count: 8, loading: 'eager' %}
{% render "partials/now/media-grid.liquid", data:albums, icon: "vinyl", title: "Albums", shape: "square", count: 8, loading: 'lazy' %} {% render "partials/now/media-grid.liquid", data:albums, icon: "vinyl", title: "Albums", shape: "square", count: 8, loading: 'lazy' %}

View file

@ -3,7 +3,7 @@ date: '2023-02-17'
title: 'Workflows: handling inbound email on Fastmail with regular expressions (now featuring ChatGPT)' title: 'Workflows: handling inbound email on Fastmail with regular expressions (now featuring ChatGPT)'
draft: false draft: false
tags: ['Email', 'Fastmail', 'regular expressions', 'workflows', 'ChatGPT'] tags: ['Email', 'Fastmail', 'regular expressions', 'workflows', 'ChatGPT']
image: /assets/img/og/fastmail-workflow.webp image: https://cdn.coryd.dev/blog/fastmail-workflow.jpg
--- ---
I've been using Fastmail for years now and have explored a number of different approaches to handling mail. I've approached it by creating rules targeting lists of top level domains, I've gone with no rules at all and a heavy-handed approach to unsubscribing from messages (operating under the idea that _everything_ warrants being seen and triaged) and I've even used HEY.<!-- excerpt -->[^1] I've been using Fastmail for years now and have explored a number of different approaches to handling mail. I've approached it by creating rules targeting lists of top level domains, I've gone with no rules at all and a heavy-handed approach to unsubscribing from messages (operating under the idea that _everything_ warrants being seen and triaged) and I've even used HEY.<!-- excerpt -->[^1]

View file

@ -1,32 +0,0 @@
const { getPostImage } = require('../../config/filters')
const md = require('markdown-it')()
const striptags = require('striptags')
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) => striptags(md.render(data.post_excerpt)),
url: (data) => data.url,
image: {
src: (data) => data.image | getPostImage,
},
author: {
name: 'Cory Dransfeldt',
},
published: (data) => data.date,
},
},
}

View file

@ -1,28 +0,0 @@
---
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 %}
<span>
<a href="/tags/{{ tag }}" class="!no-underline">
<button class="pill--button">
{{ tag }}
</button>
</a>
</span>
{% endfor %}

View file

@ -1,31 +0,0 @@
---
layout: default
title: Webrings
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 • Webrings'
description: 'Content feeds exposed by and generated from my site.'
url: https://coryd.dev/webrings
image:
src: https://coryd.dev/assets/img/avatar.webp
---
<h2
class="m-0 text-xl font-black leading-tight tracking-normal dark:text-gray-200 md:text-2xl mb-2"
>
{{ title }}
</h2>
[Webrings](https://en.wikipedia.org/wiki/Webring) are _awesome_. I'm a member of a few that follow. Check them out!
{% render "webrings/the-claw.liquid" %}
<hr />
{% render "webrings/css-joy.liquid" %}