update astro starlight & blog plugin

This commit is contained in:
vincanger 2024-11-27 12:11:28 +01:00
parent fd509b2010
commit 53a561b6c5
14 changed files with 6897 additions and 9521 deletions

View File

@ -6,7 +6,7 @@ import tailwind from '@astrojs/tailwind';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: 'https://opensaas.sh', site: 'https://docs.opensaas.sh',
trailingSlash: 'always', trailingSlash: 'always',
integrations: [ integrations: [
starlight({ starlight({

File diff suppressed because it is too large Load Diff

View File

@ -10,13 +10,13 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.6.0", "@astrojs/check": "^0.9.4",
"@astrojs/starlight": "^0.22.2", "@astrojs/starlight": "^0.29.2",
"@astrojs/starlight-tailwind": "^2.0.2", "@astrojs/starlight-tailwind": "^2.0.3",
"@astrojs/tailwind": "^5.1.0", "@astrojs/tailwind": "^5.1.2",
"astro": "^4.3.5", "astro": "^4.16.15",
"sharp": "^0.32.5", "sharp": "^0.32.5",
"starlight-blog": "^0.7.1", "starlight-blog": "^0.15.0",
"typescript": "^5.4.5" "typescript": "^5.4.5"
} }
} }

View File

@ -6,13 +6,12 @@ import Default from '@astrojs/starlight/components/Head.astro'
// ID and replace the file extension with `.png`. // ID and replace the file extension with `.png`.
const ogImageUrl = new URL( const ogImageUrl = new URL(
`/og-images/${Astro.props.id.replace(/blog\//, '').replace(/\.\w+$/, '.webp')}`, `/og-images/${Astro.props.id.replace(/blog\//, '').replace(/\.\w+$/, '.webp')}`,
'https://docs.opensaas.sh', Astro.site,
) )
--- ---
<!-- Render the default <Head/> component. -->
<Default {...Astro.props}><slot /></Default> <Default {...Astro.props}><slot /></Default>
<!-- Render the <meta/> tags for the Open Graph images. --> <!-- Open Graph images. -->
<meta property="og:image" content={ogImageUrl} /> <meta property="og:image" content={ogImageUrl} />
<meta name="twitter:image" content={ogImageUrl} /> <meta name="twitter:image" content={ogImageUrl} />

View File

@ -4,10 +4,9 @@ import config from 'virtual:starlight/user-config';
import blogConfig from 'virtual:starlight-blog-config' import blogConfig from 'virtual:starlight-blog-config'
import type { Props } from '@astrojs/starlight/props'; import type { Props } from '@astrojs/starlight/props';
const href = Astro.site;
const { siteTitle } = Astro.props; const { siteTitle } = Astro.props;
--- ---
<a {href} class="site-title sl-flex"> <a href='https://opensaas.sh' class="site-title sl-flex">
{ {
config.logo && logos.dark && ( config.logo && logos.dark && (
<> <>

View File

@ -3,6 +3,6 @@ import { i18nSchema, docsSchema } from '@astrojs/starlight/schema';
import { blogSchema } from 'starlight-blog/schema'; import { blogSchema } from 'starlight-blog/schema';
export const collections = { export const collections = {
docs: defineCollection({ schema: docsSchema({ extend: blogSchema() }) }), docs: defineCollection({ schema: docsSchema({ extend: (context) => blogSchema(context) }) }),
i18n: defineCollection({ type: 'data', schema: i18nSchema() }), i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
}; };

View File

@ -1,7 +1,13 @@
--- ---
title: How I Built & Grew CoverLetterGPT to 5,000 Users and $200 MRR title: How I Built & Grew CoverLetterGPT to 5,000 Users and $200 MRR
date: 2023-11-21 date: 2023-11-21
tags: ["indiehacker", "saas", "sideproject"] tags:
- indiehacker
- saas
- sideproject
cover:
image: ../../../../public/og-images/2023-11-21-coverlettergpt.webp
alt: CoverLetterGPT
--- ---
## Hey, Im Vince… ## Hey, Im Vince…

View File

@ -1,10 +1,11 @@
--- ---
title: 🍪 THE MOST ANNOYING COOKIE BANNER EVER HACKATHON 🤬 title: 🍪 THE MOST ANNOYING COOKIE BANNER EVER HACKATHON 🤬
date: 2024-10-10 date: 2024-10-10
tags: ["cookie consent", "saas", "sideproject", "hackathon"] tags:
cover: - cookie consent
alt: Annoying Cookie Banner Contest - saas
image: "/cookie-consent/annoying-cookie-banners.jpg" - sideproject
- hackathon
--- ---
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"> <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;">
<iframe <iframe

View File

@ -1,10 +1,14 @@
--- ---
title: We Made the Most Annoying Cookie Banners Ever title: We Made the Most Annoying Cookie Banners Ever
date: 2024-11-26 date: 2024-11-26
tags: ["cookie consent", "saas", "sideproject", "hackathon"] tags:
- cookie consent
- saas
- sideproject
- hackathon
cover: cover:
alt: the Most Annoying Cookie Banners image: ../../../../public/og-images/2024-11-22-best-annoying-cookie-consent-banners.webp
image: "/cookie-consent/annoying-cookie-banners.jpg" alt: Annoying Cookie Banner Contest
--- ---
import VideoPlayer from '../../../components/VideoPlayer.astro'; import VideoPlayer from '../../../components/VideoPlayer.astro';

View File

@ -6,7 +6,7 @@ import tailwind from '@astrojs/tailwind';
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
site: 'https://opensaas.sh', site: 'https://your-site.com',
trailingSlash: 'always', trailingSlash: 'always',
integrations: [ integrations: [
starlight({ starlight({
@ -74,11 +74,11 @@ export default defineConfig({
title: 'Blog', title: 'Blog',
customCss: ['./src/styles/tailwind.css'], customCss: ['./src/styles/tailwind.css'],
authors: { authors: {
vince: { dev: {
name: 'Vince', name: 'Dev',
title: 'Dev Rel @ Wasp', title: 'Dev @ Your SaaS',
picture: '/CRAIG_ROCK.png', // Images in the `public` directory are supported. picture: '/CRAIG_ROCK.png', // Images in the `public` directory are supported.
url: 'https://wasp-lang.dev', url: 'https://your-site.com',
}, },
}, },
}), }),

File diff suppressed because it is too large Load Diff

View File

@ -10,13 +10,13 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.6.0", "@astrojs/check": "^0.9.4",
"@astrojs/starlight": "^0.22.2", "@astrojs/starlight": "^0.29.2",
"@astrojs/starlight-tailwind": "^2.0.2", "@astrojs/starlight-tailwind": "^2.0.3",
"@astrojs/tailwind": "^5.1.0", "@astrojs/tailwind": "^5.1.2",
"astro": "^4.3.5", "astro": "^4.16.15",
"sharp": "^0.32.5", "sharp": "^0.32.5",
"starlight-blog": "^0.7.1", "starlight-blog": "^0.15.0",
"typescript": "^5.4.5" "typescript": "^5.4.5"
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -3,6 +3,6 @@ import { i18nSchema, docsSchema } from '@astrojs/starlight/schema';
import { blogSchema } from 'starlight-blog/schema'; import { blogSchema } from 'starlight-blog/schema';
export const collections = { export const collections = {
docs: defineCollection({ schema: docsSchema({ extend: blogSchema() }) }), docs: defineCollection({ schema: docsSchema({ extend: (context) => blogSchema(context) }) }),
i18n: defineCollection({ type: 'data', schema: i18nSchema() }), i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
}; };