feat: jsonld support
This commit is contained in:
parent
5bb5933917
commit
7ea51043d8
16 changed files with 144 additions and 5 deletions
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,
|
||||
},
|
||||
},
|
||||
}
|
Reference in a new issue