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

docs: add share image and favicon for the docs site #1367

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions packages/docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ export default defineConfig({
social: {
github: "https://github.com/jimp-dev/jimp",
},
favicon: "/favicon.png",
components: {
Head: "./src/overwrite-components/head.astro",
},
sidebar: [
{
label: "Docs",
Expand Down
Binary file added packages/docs/public/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion packages/docs/public/favicon.svg

This file was deleted.

Binary file added packages/docs/public/share-banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions packages/docs/src/overwrite-components/head.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
import type { Props } from "@astrojs/starlight/props";
import Default from "@astrojs/starlight/components/Head.astro";
---

<Default {...Astro.props}>
<slot />
</Default>
<meta name="twitter:image" content="https://jimp-dev.github.io/jimp/share-banner.png">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These have to be a static URL, otherwise some sites don't know how to resolve this quite right. If we add a custom domain in the future, we'll want to update this

<meta name="twitter:card" content="summary_large_image">
<meta property="og:image" content="https://jimp-dev.github.io/jimp/share-banner.png">
Loading