Skip to content
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

doc/website: new share image template #1993

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions doc/website/src/theme/share-image.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const defaultImg = "https://atlas-og-img.vercel.app/**Atlas%20%7C**%20Open-source%20database%20schema%20management.png?theme=dark"
const defaultImg = "https://og.atlasgo.io/image?title=Open-source%20database%20schema%20management"

// getImage returns the share image URL for a page/blog post. Order of evaluation is:
// the `image` attribute in the document front-matter, the `shareText` attribute in the
Expand All @@ -9,10 +9,10 @@ export function getImage(metadata) {
return frontMatter.image
}
if (frontMatter.shareText) {
return `https://atlas-og-img.vercel.app/${encodeURIComponent(frontMatter.shareText)}.png?theme=dark`
return `https://og.atlasgo.io/image?title=${encodeURIComponent(frontMatter.shareText)}`
}
if (title) {
return `https://atlas-og-img.vercel.app/${encodeURIComponent(title)}.png?theme=dark`
return `https://og.atlasgo.io/image?title=${encodeURIComponent(title)}`
}
return defaultImg
}
Loading