Skip to content

Commit

Permalink
Add og image for playground
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Sep 11, 2024
1 parent aa011ba commit c9b1829
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/docs/src/components/Head.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { Props } from '@astrojs/starlight/props';
const slug = Astro.props.slug;
const url = new URL(Astro.url);
url.pathname = `/og/docs${slug ? `/${slug}` : ''}.webp`;
url.searchParams.append('v', '3');
url.searchParams.append('v', '4');
---

<Default {...Astro.props} />
Expand Down
4 changes: 4 additions & 0 deletions packages/docs/src/pages/og/[...route].ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ const getPages = async () => {
frontmatter: { title: 'Become a sponsor!', description: 'Become a sponsor of Knip' },
};

pages['docs/playground.webp'] = {
frontmatter: { title: 'Playground', description: 'Try Knip in your browser' },
};

return pages;
};

Expand Down

0 comments on commit c9b1829

Please sign in to comment.