Updates Astro, Starlight, Starlight Blog versions (#122)

* Updates Astro, Starlight, Starlight Blog versions

Signed-off-by: Mihovil Ilakovac <mihovil@ilakovac.com>

* Fixes formatting

* Cleanup

---------

Signed-off-by: Mihovil Ilakovac <mihovil@ilakovac.com>
This commit is contained in:
Mihovil Ilakovac
2024-05-13 16:16:14 +02:00
committed by GitHub
parent 7f431e823b
commit 03ca9d5700
6 changed files with 2985 additions and 8030 deletions

4
.prettierrc Normal file
View File

@@ -0,0 +1,4 @@
{
"semi": true,
"singleQuote": true,
}

View File

@@ -2,25 +2,12 @@ import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightBlog from 'starlight-blog';
import tailwind from "@astrojs/tailwind";
import tailwind from '@astrojs/tailwind';
// https://astro.build/config
export default defineConfig({
site: 'https://opensaas.sh',
integrations: [
starlightBlog({
title: 'Blog',
customCss: ['./src/styles/tailwind.css'],
authors: {
vince: {
name: 'Vince',
title: 'Dev Rel @ Wasp',
picture: '/CRAIG_ROCK.png',
// Images in the `public` directory are supported.
url: 'https://wasp-lang.dev',
},
},
}),
starlight({
title: 'Your SaaS',
customCss: ['./src/styles/tailwind.css'],
@@ -53,9 +40,6 @@ export default defineConfig({
},
components: {
SiteTitle: './src/components/MyHeader.astro',
MarkdownContent: 'starlight-blog/overrides/MarkdownContent.astro',
Sidebar: 'starlight-blog/overrides/Sidebar.astro',
// ThemeSelect: 'starlight-blog/overrides/ThemeSelect.astro',
},
social: {
@@ -83,6 +67,20 @@ export default defineConfig({
],
},
],
plugins: [
starlightBlog({
title: 'Blog',
customCss: ['./src/styles/tailwind.css'],
authors: {
vince: {
name: 'Vince',
title: 'Dev Rel @ Wasp',
picture: '/CRAIG_ROCK.png', // Images in the `public` directory are supported.
url: 'https://wasp-lang.dev',
},
},
}),
],
}),
tailwind({ applyBaseStyles: false }),
],

10957
blog/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,14 +10,13 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.3.1",
"@astrojs/starlight": "^0.13.0",
"@astrojs/starlight-tailwind": "^2.0.1",
"@astrojs/check": "^0.6.0",
"@astrojs/starlight": "^0.22.2",
"@astrojs/starlight-tailwind": "^2.0.2",
"@astrojs/tailwind": "^5.1.0",
"astro": "^3.2.3",
"astro": "^4.3.5",
"sharp": "^0.32.5",
"starlight-blog": "^0.4.0",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.2"
"starlight-blog": "^0.7.1",
"typescript": "^5.4.5"
}
}

View File

@@ -5,6 +5,7 @@ import blogConfig from 'virtual:starlight-blog-config'
import type { Props } from '@astrojs/starlight/props';
const href = Astro.site
const { siteTitle } = Astro.props;
---
<a {href} class="site-title sl-flex">
{
@@ -31,7 +32,7 @@ const href = Astro.site
)
}
<span class:list={{ 'sr-only': config.logo?.replacesTitle }} class="dark:text-white hover:text-yellow-500">
{config.title}
{siteTitle}
</span>
</a>
<div>

View File

@@ -1,8 +1,8 @@
import { defineCollection } from 'astro:content';
import { i18nSchema } from '@astrojs/starlight/schema';
import { docsAndBlogSchema } from 'starlight-blog/schema';
import { i18nSchema, docsSchema } from '@astrojs/starlight/schema';
import { blogSchema } from 'starlight-blog/schema';
export const collections = {
docs: defineCollection({ schema: docsAndBlogSchema }),
docs: defineCollection({ schema: docsSchema({ extend: blogSchema() }) }),
i18n: defineCollection({ type: 'data', schema: i18nSchema() }),
};