-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(craigory-dev): add og images for blog posts and presentations
- Loading branch information
1 parent
f3db8fc
commit 72578db
Showing
12 changed files
with
821 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { slugMap } from '@new-personal-monorepo/blog-posts'; | ||
import { PageContext } from 'vike/types'; | ||
|
||
export default (pageContext: PageContext) => { | ||
const blogPost = slugMap[pageContext.routeParams?.slug]; | ||
return blogPost.title; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { PRESENTATIONS } from '@new-personal-monorepo/presentations'; | ||
import { PageContext } from 'vike/types'; | ||
|
||
export default (pageContext: PageContext) => { | ||
const presentation = PRESENTATIONS[pageContext.routeParams?.presentation]; | ||
return presentation.description; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { PRESENTATIONS } from '@new-personal-monorepo/presentations'; | ||
import { PageContext } from 'vike/types'; | ||
|
||
export default (pageContext: PageContext) => { | ||
const presentation = PRESENTATIONS[pageContext.routeParams?.presentation]; | ||
return presentation.title; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { PageContext } from 'vike/types'; | ||
|
||
export default (pageContext: PageContext) => { | ||
let base = new URL('https://craigory.dev'); | ||
if (import.meta.env.PUBLIC_ENV__BASE_URL) { | ||
base = new URL(import.meta.env.PUBLIC_ENV__BASE_URL, base); | ||
} | ||
return new URL(pageContext.urlOriginal + '/og.png', base).href; | ||
}; |
Oops, something went wrong.