Skip to content

Commit 16208b1

Browse files
committed
[Doc] Bootstrap headless documentation
1 parent 1c034f2 commit 16208b1

24 files changed

+5992
-371
lines changed

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ cypress/screenshots
2323
!.yarn/plugins
2424
!.yarn/releases
2525
!.yarn/sdks
26-
!.yarn/versions
26+
!.yarn/versions
27+
.astro

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ build: build-ra-core build-ra-data-fakerest build-ra-ui-materialui build-ra-data
117117
doc: ## compile doc as html and launch doc web server
118118
@yarn doc
119119

120+
doc-headless: ## launch headless doc web server
121+
@cd docs_headless && yarn dev
122+
120123
docker-doc: ## run the doc website in a docker container
121124
@docker run -it --rm \
122125
-p 4000:4000 \

docs_headless/.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store

docs_headless/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Starlight Starter Kit: Basics
2+
3+
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
4+
5+
```
6+
npm create astro@latest -- --template starlight
7+
```
8+
9+
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
10+
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
11+
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/withastro/starlight&create_from_path=examples/basics)
12+
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)
13+
14+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
15+
16+
## 🚀 Project Structure
17+
18+
Inside of your Astro + Starlight project, you'll see the following folders and files:
19+
20+
```
21+
.
22+
├── public/
23+
├── src/
24+
│ ├── assets/
25+
│ ├── content/
26+
│ │ └── docs/
27+
│ └── content.config.ts
28+
├── astro.config.mjs
29+
├── package.json
30+
└── tsconfig.json
31+
```
32+
33+
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
34+
35+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
36+
37+
Static assets, like favicons, can be placed in the `public/` directory.
38+
39+
## 🧞 Commands
40+
41+
All commands are run from the root of the project, from a terminal:
42+
43+
| Command | Action |
44+
| :------------------------ | :----------------------------------------------- |
45+
| `npm install` | Installs dependencies |
46+
| `npm run dev` | Starts local dev server at `localhost:4321` |
47+
| `npm run build` | Build your production site to `./dist/` |
48+
| `npm run preview` | Preview your build locally, before deploying |
49+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
50+
| `npm run astro -- --help` | Get help using the Astro CLI |
51+
52+
## 👀 Want to learn more?
53+
54+
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).

docs_headless/astro.config.mjs

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
// @ts-check
2+
import { defineConfig } from "astro/config";
3+
import starlight from "@astrojs/starlight";
4+
5+
import tailwindcss from "@tailwindcss/vite";
6+
7+
// https://astro.build/config
8+
export default defineConfig({
9+
integrations: [
10+
starlight({
11+
title: "React Admin Headless",
12+
customCss: [
13+
"./src/styles/global.css",
14+
],
15+
social: [
16+
{
17+
icon: "github",
18+
label: "GitHub",
19+
href: "https://github.com/withastro/starlight",
20+
},
21+
],
22+
sidebar: [
23+
{
24+
label: "Guides & Concepts",
25+
items: [
26+
// Each item here is one entry in the navigation menu.
27+
{ label: "General Concepts", slug: "guides/architecture" },
28+
{ label: "General Concepts", slug: "guides/architecture" },
29+
{ label: "General Concepts", slug: "guides/architecture" },
30+
{ label: "General Concepts", slug: "guides/architecture" },
31+
{ label: "General Concepts", slug: "guides/architecture" },
32+
{ label: "General Concepts", slug: "guides/architecture" },
33+
{ label: "General Concepts", slug: "guides/architecture" },
34+
{ label: "General Concepts", slug: "guides/architecture" },
35+
{ label: "General Concepts", slug: "guides/architecture" },
36+
{ label: "General Concepts", slug: "guides/architecture" },
37+
{ label: "General Concepts", slug: "guides/architecture" },
38+
{ label: "General Concepts", slug: "guides/architecture" },
39+
{ label: "General Concepts", slug: "guides/architecture" },
40+
{ label: "General Concepts", slug: "guides/architecture" },
41+
{ label: "General Concepts", slug: "guides/architecture" },
42+
{ label: "General Concepts", slug: "guides/architecture" },
43+
{ label: "General Concepts", slug: "guides/architecture" },
44+
{ label: "General Concepts", slug: "guides/architecture" },
45+
{ label: "General Concepts", slug: "guides/architecture" },
46+
{ label: "General Concepts", slug: "guides/architecture" },
47+
{ label: "General Concepts", slug: "guides/architecture" },
48+
{ label: "General Concepts", slug: "guides/architecture" },
49+
{ label: "General Concepts", slug: "guides/architecture" },
50+
{ label: "General Concepts", slug: "guides/architecture" },
51+
{ label: "General Concepts", slug: "guides/architecture" },
52+
{ label: "General Concepts", slug: "guides/architecture" },
53+
{ label: "General Concepts", slug: "guides/architecture" },
54+
{ label: "General Concepts", slug: "guides/architecture" },
55+
{ label: "General Concepts", slug: "guides/architecture" },
56+
{ label: "General Concepts", slug: "guides/architecture" },
57+
{ label: "General Concepts", slug: "guides/architecture" },
58+
{ label: "General Concepts", slug: "guides/architecture" },
59+
{ label: "General Concepts", slug: "guides/architecture" },
60+
{ label: "General Concepts", slug: "guides/architecture" },
61+
{ label: "General Concepts", slug: "guides/architecture" },
62+
{ label: "General Concepts", slug: "guides/architecture" },
63+
{ label: "General Concepts", slug: "guides/architecture" },
64+
{ label: "General Concepts", slug: "guides/architecture" },
65+
{ label: "General Concepts", slug: "guides/architecture" },
66+
{ label: "General Concepts", slug: "guides/architecture" },
67+
{ label: "General Concepts", slug: "guides/architecture" },
68+
{ label: "General Concepts", slug: "guides/architecture" },
69+
{ label: "Data Fetching", slug: "guides/datafetchingguide" },
70+
{
71+
label: "CRUD pages",
72+
slug: "guides/crud",
73+
attrs: {
74+
class: "flex items-center",
75+
},
76+
badge: {
77+
text: "",
78+
variant: "default",
79+
class: "ee-badge",
80+
},
81+
},
82+
],
83+
},
84+
{
85+
label: "Reference",
86+
autogenerate: { directory: "reference" },
87+
},
88+
],
89+
components: {
90+
// Override the default `SocialIcons` component.
91+
Sidebar: "./src/components/CustomSidebar.astro",
92+
},
93+
}),
94+
],
95+
96+
vite: {
97+
plugins: [tailwindcss()],
98+
},
99+
});

docs_headless/package.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"name": "ra-core-doc",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"start": "astro dev",
8+
"build": "astro build",
9+
"preview": "astro preview",
10+
"astro": "astro"
11+
},
12+
"dependencies": {
13+
"@astrojs/starlight": "^0.34.8",
14+
"@astrojs/starlight-tailwind": "^4.0.1",
15+
"@tailwindcss/vite": "^4.1.11",
16+
"astro": "^5.6.1",
17+
"sharp": "^0.34.2",
18+
"tailwindcss": "^4.1.11"
19+
},
20+
"devDependencies": {
21+
"prettier": "^3.2.5",
22+
"prettier-plugin-astro": "^0.14.1"
23+
}
24+
}

docs_headless/public/favicon.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
71.4 KB
Loading
22.9 KB
Loading

0 commit comments

Comments
 (0)