Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 101 additions & 9 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import react from "@astrojs/react";
import starlightOpenAPIPlugin, {
openAPISidebarGroups,
} from "starlight-openapi";
import starlightSidebarTopics from "starlight-sidebar-topics";
import { pele } from "astro-pele";

// https://astro.build/config
export default defineConfig({
Expand Down Expand Up @@ -32,6 +34,9 @@ export default defineConfig({
editLink: {
baseUrl: "https://github.com/pulsate-dev/docs/edit/main/",
},
components: {
Sidebar: "./src/content/components/organisms/Sidebar.astro",
},
social: [
{
icon: "discord",
Expand All @@ -54,18 +59,105 @@ export default defineConfig({
"https://unpkg.com/@pulsate-dev/api-schema@latest/schema.json",
},
]),
],
sidebar: [
{
label: "スタートガイド",
translations: {
en: "Start Guide",
starlightSidebarTopics(
[
{
id: "pulsate",
label: "Pulsate",
link: "/pulsate/beginner/what-is-pulsate",
icon: "open-book",
items: [
{
label: "スタートガイド",
translations: {
en: "Start Guide",
},
items: [
"pulsate/beginner/what-is-pulsate",
"pulsate/beginner/getting-started",
],
},
...openAPISidebarGroups,
],
},
{
id: "caramel",
label: "Caramel",
link: "/caramel",
icon: "laptop",
items: [{ label: "Caramel", items: ["caramel"] }],
},
{
id: "spec",
label: "Specification",
link: "/spec",
icon: "document",
items: [
{
label: "プロジェクト",
items: [
{ slug: "spec", label: "Introduction" },
"spec/project",
"spec/user-story",
],
},
{
label: "モデルリファレンス",
items: [
{ slug: "spec/model", label: "概要" },
"spec/model/account",
"spec/model/note",
"spec/model/drive",
"spec/model/list",
"spec/model/notification",
"spec/model/event",
],
},
{
label: "API エンドポイント",
items: [
{ slug: "spec/endpoint", label: "概要" },
"spec/endpoint/account",
"spec/endpoint/drive",
"spec/endpoint/list",
"spec/endpoint/notes",
"spec/endpoint/notification",
"spec/endpoint/search",
"spec/endpoint/timeline",
],
},
{
label: "設計",
items: ["spec/module", "spec/authorization"],
},
],
},
],
{
// The index page is a splash landing page that belongs to no topic
exclude: ["/", "/en"],
// Pages absent from `items` (hidden or plugin-generated by starlight-openapi) need an explicit topic
topics: {
pulsate: [
"/api-reference/**",
"/en/api-reference/**",
"/pulsate/user/**",
"/en/pulsate/user/**",
],
},
},
items: ["beginner/what-is-pulsate", "beginner/getting-started"],
},
...openAPISidebarGroups,
),
],
}),
react(),
pele(),
{
name: "pele-lightbox",
hooks: {
"astro:config:setup": ({ injectScript }) => {
injectScript("page", 'import "/src/content/scripts/pele-lightbox.ts";');
},
},
},
],
});
1 change: 1 addition & 0 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ idiomatic_version_file_enable_tools = ["node"]

[tools]
node = "26"
pnpm = "12.17.0"
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@
"@astrojs/starlight": "0.43.1",
"@scalar/api-reference-react": "^0.9.0",
"astro": "^7.0.0",
"astro-pele": "^0.1.3",
"pele": "^1.13.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sharp": "^0.35.0",
"starlight-openapi": "^0.27.0"
"starlight-openapi": "^0.27.0",
"starlight-sidebar-topics": "^0.9.0",
"starlight-sidebar-topics-dropdown": "^0.7.1"
},
"devDependencies": {
"@biomejs/biome": "^2.0.0",
Expand Down
84 changes: 84 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/content/components/organisms/Sidebar.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
import Default from "@astrojs/starlight/components/Sidebar.astro";
import { TopicsDropdown } from "starlight-sidebar-topics-dropdown";

const { hasSidebar } = Astro.locals.starlightRoute;
const { isPageWithTopic } = Astro.locals.starlightSidebarTopics;
---

{hasSidebar && isPageWithTopic && <TopicsDropdown />}
<Default><slot /></Default>
8 changes: 8 additions & 0 deletions src/content/docs/caramel/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Caramel
description: Caramel は Pulsate の Minimal クライアントです。
---

Caramel は Pulsate のための Minimal なクライアントです。

このセクションのドキュメントは準備中です。
2 changes: 1 addition & 1 deletion src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ hero:
actions:
- text: はじめる
icon: right-arrow
link: /beginner/what-is-pulsate
link: /pulsate/beginner/what-is-pulsate
- text: GitHub
icon: external
variant: minimal
Expand Down
File renamed without changes.
File renamed without changes.
Loading
Loading