Skip to content

Commit 10a031d

Browse files
authored
feat(docs): add blog (#1786)
1 parent ac72738 commit 10a031d

File tree

9 files changed

+416
-5
lines changed

9 files changed

+416
-5
lines changed

docs/astro.config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { defineConfig } from 'astro/config';
33
import starlight from '@astrojs/starlight';
44
import tailwindcss from '@tailwindcss/vite';
5+
import starlightBlog from 'starlight-blog';
56
import starlightLinksValidator from 'starlight-links-validator';
67

78
const site = 'https://dart-frog.dev/';
@@ -78,6 +79,17 @@ export default defineConfig({
7879
},
7980
],
8081
plugins: [
82+
starlightBlog({
83+
metrics: { readingTime: true, words: false },
84+
authors: {
85+
team: {
86+
name: 'Dart Frog',
87+
title: 'Team',
88+
picture: '/headshots/dart-frog.svg',
89+
url: site,
90+
},
91+
},
92+
}),
8193
starlightLinksValidator({
8294
errorOnFallbackPages: false,
8395
errorOnInconsistentLocale: true,

docs/package-lock.json

Lines changed: 160 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"@astrojs/check": "^0.9.4",
1616
"@astrojs/starlight": "^0.35.2",
1717
"astro": "^5.12.5",
18-
"sharp": "^0.34.3"
18+
"sharp": "^0.34.3",
19+
"starlight-blog": "^0.24.0"
1920
},
2021
"devDependencies": {
2122
"@astrojs/starlight-tailwind": "^4.0.1",

docs/public/headshots/dart-frog.svg

Lines changed: 17 additions & 0 deletions
Loading
Lines changed: 42 additions & 0 deletions
Loading
Lines changed: 38 additions & 0 deletions
Loading

docs/src/content.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { defineCollection } from 'astro:content';
22
import { docsLoader } from '@astrojs/starlight/loaders';
33
import { docsSchema } from '@astrojs/starlight/schema';
4+
import { blogSchema } from 'starlight-blog/schema';
45

56
export const collections = {
6-
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
7+
docs: defineCollection({
8+
loader: docsLoader(),
9+
schema: docsSchema({ extend: (context) => blogSchema(context) }),
10+
}),
711
};

0 commit comments

Comments
 (0)