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

@ -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,
},
},
}