-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add dynamic og images #342
base: dev
Are you sure you want to change the base?
Conversation
Deploying 2nicove with Cloudflare Pages
|
e072e3a
to
f13ae83
Compare
de43b9d
to
017e46c
Compare
src/routes/+layout.svelte
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SEO component moved one layer deeper to prevent any issues with paraglide
src/routes/+layout.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metadata is being generated one layer deeper now
src/routes/+page.svelte
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page was never accessible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generating metadata server-side, though I'm not sure if this is strictly required now that an api route handles the opengraph image
@@ -0,0 +1,15 @@ | |||
import { API_OPENGRAPH_GENERATOR } from '$env/static/private'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The url for generating the open graph images
export const GET: RequestHandler = async ({ url, fetch, params }) => { | ||
const route = params.route as keyof typeof captions; | ||
const lang = i18n.getLanguageFromUrl(url); | ||
const text = captions[route] || captions.default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uses only text that exists in the captions
table, either the route specific description or the default. Users cannot generate their own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Settings page was condensed into one file
865ebd3
to
f9ef47a
Compare
No description provided.