Skip to content

Commit 1d6f77c

Browse files
authored
Add topics (#6)
* feat: add topics plugin * chore: update site URL * chore: format * feat: remove args
1 parent 0643874 commit 1d6f77c

File tree

9 files changed

+105
-77
lines changed

9 files changed

+105
-77
lines changed

astro.config.mjs

+88-75
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,97 @@
11
import starlight from "@astrojs/starlight";
22
// @ts-check
33
import { defineConfig } from "astro/config";
4+
45
import ecTwoSlash from "expressive-code-twoslash";
6+
import topics from "starlight-sidebar-topics";
57

6-
const site = "https://docs.bomb.sh/";
8+
const site = "https://bomb.sh/docs/";
79

810
// https://astro.build/config
911
export default defineConfig({
10-
site: 'https://docs.bomb.sh/',
11-
base: '/docs',
12-
outDir: './dist/docs/',
13-
integrations: [
14-
starlight({
15-
title: "Bombshell",
16-
customCss: [
17-
// Relative path to your @font-face CSS file.
18-
"./src/fonts/font-face.css",
19-
],
20-
logo: {
21-
dark: "./src/assets/dark.svg",
22-
light: "./src/assets/light.svg",
23-
},
24-
components: {
25-
Head: "./src/starlightOverrides/Head.astro",
26-
},
27-
expressiveCode: {
28-
plugins: [ecTwoSlash()],
29-
},
30-
editLink: {
31-
baseUrl: "https://github.com/bombshell-dev/clack/docs/edit/main/",
32-
},
33-
head: [
34-
{
35-
tag: "meta",
36-
attrs: {
37-
name: "og:image",
38-
content: `${site}og-docs.png`,
39-
},
40-
},
41-
{
42-
tag: "meta",
43-
attrs: {
44-
name: "twitter:image",
45-
content: `${site}og-docs.png`,
46-
},
47-
},
48-
{
49-
tag: "meta",
50-
attrs: {
51-
name: "twitter:site",
52-
content: "bombshell",
53-
},
54-
},
55-
{
56-
tag: "meta",
57-
attrs: {
58-
name: "twitter:creator",
59-
content: "bombshell",
60-
},
61-
},
62-
],
63-
social: {
64-
discord: "https://bomb.sh/chat",
65-
blueSky: "https://bomb.sh/on/bluesky",
66-
github: "https://bomb.sh/on/github",
67-
},
68-
sidebar: [
69-
{
70-
label: "Basics",
71-
autogenerate: { directory: "basics" },
72-
},
73-
{
74-
label: "Clack",
75-
autogenerate: { directory: "clack" },
76-
},
77-
{
78-
label: "Guides",
79-
autogenerate: { directory: "guides" },
80-
},
81-
],
82-
}),
83-
],
12+
site: "https://bomb.sh/",
13+
base: "/docs",
14+
outDir: "./dist/docs/",
15+
integrations: [
16+
starlight({
17+
title: "Bombshell",
18+
customCss: [
19+
// Relative path to your @font-face CSS file.
20+
"./src/fonts/font-face.css",
21+
],
22+
logo: {
23+
dark: "./src/assets/dark.svg",
24+
light: "./src/assets/light.svg",
25+
},
26+
components: {
27+
Head: "./src/starlightOverrides/Head.astro",
28+
},
29+
expressiveCode: {
30+
plugins: [ecTwoSlash()],
31+
},
32+
editLink: {
33+
baseUrl: "https://github.com/bombshell-dev/docs/edit/main/",
34+
},
35+
head: [
36+
{
37+
tag: "link",
38+
attrs: {
39+
rel: "stylesheet",
40+
href: "https://use.typekit.net/bst3mzh.css?v=4",
41+
},
42+
},
43+
{
44+
tag: "meta",
45+
attrs: {
46+
name: "og:image",
47+
content: `${site}og-docs.png`,
48+
},
49+
},
50+
{
51+
tag: "meta",
52+
attrs: {
53+
name: "twitter:image",
54+
content: `${site}og-docs.png`,
55+
},
56+
},
57+
{
58+
tag: "meta",
59+
attrs: {
60+
name: "twitter:site",
61+
content: "bombshell",
62+
},
63+
},
64+
{
65+
tag: "meta",
66+
attrs: {
67+
name: "twitter:creator",
68+
content: "bombshell",
69+
},
70+
},
71+
],
72+
social: {
73+
discord: "https://bomb.sh/chat",
74+
blueSky: "https://bomb.sh/on/bluesky",
75+
github: "https://bomb.sh/on/github",
76+
},
77+
plugins: [
78+
topics([
79+
{
80+
label: "Clack",
81+
id: "clack",
82+
icon: "seti:hex",
83+
link: "/clack/basics/getting-started",
84+
items: [
85+
{ label: "Basics", autogenerate: { directory: "clack/basics" } },
86+
{
87+
label: "Packages",
88+
autogenerate: { directory: "clack/packages" },
89+
},
90+
{ label: "Guides", autogenerate: { directory: "clack/guides" } },
91+
],
92+
}
93+
]),
94+
],
95+
}),
96+
],
8497
});

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"@types/node": "^22.13.11",
1717
"astro": "^5.1.5",
1818
"expressive-code-twoslash": "^0.4.0",
19-
"sharp": "^0.33.5"
19+
"sharp": "^0.33.5",
20+
"starlight-sidebar-topics": "^0.6.0"
2021
},
2122
"pnpm": {
2223
"onlyBuiltDependencies": [

pnpm-lock.yaml

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/content/docs/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ hero:
1313
light: "/src/assets/light.svg"
1414
actions:
1515
- text: Get started
16-
link: /docs/basics/getting-started/
16+
link: /docs/clack/basics/getting-started/
1717
icon: right-arrow
1818
variant: primary
1919
- text: GitHub repository

0 commit comments

Comments
 (0)