Skip to content

Commit

Permalink
Feat/paperless page (#22)
Browse files Browse the repository at this point in the history
* feat: first draft

* fix: text changes

* feat: add json schema for blog posts

* feat: add url to author json schema
  • Loading branch information
pReya authored Feb 23, 2024
1 parent 24b7aaf commit 55c7e42
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/content/authors/moritz.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"webp": "/images/moritz_avatar.webp",
"alt": "Portrait von Moritz Stückler"
},
"description": "arbeitete zunächst viele Jahre als IT-Journalist und entschied sich 2014 für den Berufswechsel zum Software-Entwickler. Nach dem Studium arbeitete er als Full-Stack-Entwickler in Produktfirmen und Agenturen. Sein Schwerpunkt sind Frontend-Technologien, CMS-Systeme und Open-Source-Software."
"description": "arbeitete zunächst viele Jahre als IT-Journalist und entschied sich 2014 für den Berufswechsel zum Software-Entwickler. Nach dem Studium arbeitete er als Full-Stack-Entwickler in Produktfirmen und Agenturen. Sein Schwerpunkt sind Frontend-Technologien, CMS-Systeme und Open-Source-Software.",
"homepage": "https://netchild.de/"
}
1 change: 1 addition & 0 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const authorCollection = defineCollection({
webp: z.string().optional(),
alt: z.string(),
}),
homepage: z.string().optional(),
}),
})

Expand Down
1 change: 1 addition & 0 deletions src/pages/blog/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const schema = {
description: teaser,
author: authors.map(({ data }) => ({
name: `${data.firstName} ${data.lastName}`,
...(data.homepage ? { url: data.homepage } : {}),
'@type': 'Person',
})),
datePublished: date?.toISOString(),
Expand Down

0 comments on commit 55c7e42

Please sign in to comment.