Skip to content

Commit 6d813e7

Browse files
committed
feat: add blog infrastructure with starlight-blog plugin
Integrate the starlight-blog plugin to enable a blog section on the documentation site. This provides paginated blog listing pages and individual post pages with date-based ordering. - Add starlight-blog plugin to Astro Starlight configuration - Add example blog post template showing frontmatter format - Add VS Code settings for the workspace Signed-off-by: David Justice <david@justice.dev>
1 parent fa9de6e commit 6d813e7

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

.vscode/settings.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"chat.tools.terminal.autoApprove": {
3+
"npx astro": true,
4+
"/^node node_modules/\\.bin/astro build 2>&1$/": {
5+
"approve": true,
6+
"matchCommandLine": true
7+
},
8+
"git stash": true
9+
}
10+
}

astro.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// @ts-check
22
import { defineConfig } from 'astro/config';
33
import starlight from '@astrojs/starlight';
4+
import starlightBlog from 'starlight-blog';
45

56
export default defineConfig({
67
site: 'https://hyperlight.org',
@@ -26,6 +27,7 @@ export default defineConfig({
2627
],
2728
},
2829
],
30+
plugins: [starlightBlog({})],
2931
}),
3032
],
3133
});

src/content/docs/blog/example.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: My first blog post
3+
date: 2023-07-24
4+
draft: true
5+
---
6+
7+
## Hello
8+
9+
Hello world!

0 commit comments

Comments
 (0)