Skip to content

Commit d440c94

Browse files
committed
from live coding
0 parents  commit d440c94

24 files changed

+5061
-0
lines changed

.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

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"recommendations": ["astro-build.astro-vscode"],
3+
"unwantedRecommendations": []
4+
}

.vscode/launch.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"command": "./node_modules/.bin/astro dev",
6+
"name": "Development server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
}
10+
]
11+
}

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 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)
12+
13+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
14+
15+
## 🚀 Project Structure
16+
17+
Inside of your Astro + Starlight project, you'll see the following folders and files:
18+
19+
```
20+
.
21+
├── public/
22+
├── src/
23+
│ ├── assets/
24+
│ ├── content/
25+
│ │ ├── docs/
26+
│ │ └── config.ts
27+
│ └── env.d.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).

astro.config.mjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { defineConfig } from 'astro/config';
2+
import starlight from '@astrojs/starlight';
3+
4+
import svelte from "@astrojs/svelte";
5+
6+
// https://astro.build/config
7+
export default defineConfig({
8+
integrations: [starlight({
9+
customCss: ['./src/styles/main.css'],
10+
title: 'My Docs',
11+
social: {
12+
github: 'https://github.com/withastro/starlight',
13+
mastodon: 'https://m.webtoo.ls/@swithinbank'
14+
},
15+
sidebar: [{
16+
label: 'Guides',
17+
items: [
18+
// Each item here is one entry in the navigation menu.
19+
{
20+
label: 'Example Guide',
21+
link: '/guides/example/'
22+
}]
23+
}, {
24+
label: 'Reference',
25+
autogenerate: {
26+
directory: 'reference'
27+
}
28+
}],
29+
// Set English as the default language for this site.
30+
// defaultLocale: 'en',
31+
locales: {
32+
// English docs in `src/content/docs/en/`
33+
root: {
34+
label: 'English',
35+
lang: 'en'
36+
},
37+
// Simplified Chinese docs in `src/content/docs/zh-cn/`
38+
'zh-cn': {
39+
label: '简体中文',
40+
lang: 'zh-CN'
41+
},
42+
// Arabic docs in `src/content/docs/ar/`
43+
ar: {
44+
label: 'العربية',
45+
dir: 'rtl'
46+
}
47+
}
48+
}), svelte()]
49+
});

package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "magenta-meteor",
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/check": "^0.4.1",
14+
"@astrojs/starlight": "^0.17.3",
15+
"@astrojs/svelte": "^5.0.3",
16+
"astro": "^4.2.1",
17+
"sharp": "^0.32.5",
18+
"svelte": "^4.2.10",
19+
"typescript": "^5.3.3"
20+
}
21+
}

0 commit comments

Comments
 (0)