Skip to content

Commit caad9ee

Browse files
astrobot-houstonairslice
authored andcommittedOct 10, 2024
Initial commit from Astro
0 parents  commit caad9ee

15 files changed

+208
-0
lines changed
 

‎.gitignore

+21
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

+4
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

+11
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

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
│ │ └── config.ts
28+
│ └── env.d.ts
29+
├── astro.config.mjs
30+
├── package.json
31+
└── tsconfig.json
32+
```
33+
34+
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.
35+
36+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
37+
38+
Static assets, like favicons, can be placed in the `public/` directory.
39+
40+
## 🧞 Commands
41+
42+
All commands are run from the root of the project, from a terminal:
43+
44+
| Command | Action |
45+
| :------------------------ | :----------------------------------------------- |
46+
| `npm install` | Installs dependencies |
47+
| `npm run dev` | Starts local dev server at `localhost:4321` |
48+
| `npm run build` | Build your production site to `./dist/` |
49+
| `npm run preview` | Preview your build locally, before deploying |
50+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
51+
| `npm run astro -- --help` | Get help using the Astro CLI |
52+
53+
## 👀 Want to learn more?
54+
55+
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

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
import starlight from '@astrojs/starlight';
4+
5+
// https://astro.build/config
6+
export default defineConfig({
7+
integrations: [
8+
starlight({
9+
title: 'My Docs',
10+
social: {
11+
github: 'https://github.com/withastro/starlight',
12+
},
13+
sidebar: [
14+
{
15+
label: 'Guides',
16+
items: [
17+
// Each item here is one entry in the navigation menu.
18+
{ label: 'Example Guide', slug: 'guides/example' },
19+
],
20+
},
21+
{
22+
label: 'Reference',
23+
autogenerate: { directory: 'reference' },
24+
},
25+
],
26+
}),
27+
],
28+
});

‎package.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "reearth-visualizer-developer",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"dev": "astro dev",
7+
"start": "astro dev",
8+
"build": "astro check && astro build",
9+
"preview": "astro preview",
10+
"astro": "astro"
11+
},
12+
"dependencies": {
13+
"@astrojs/starlight": "^0.28.3",
14+
"astro": "^4.15.3",
15+
"sharp": "^0.32.5",
16+
"@astrojs/check": "^0.9.4",
17+
"typescript": "^5.6.3"
18+
}
19+
}

‎public/favicon.svg

+1
Loading

‎src/assets/houston.webp

96.2 KB
Binary file not shown.

‎src/content/config.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineCollection } from 'astro:content';
2+
import { docsSchema } from '@astrojs/starlight/schema';
3+
4+
export const collections = {
5+
docs: defineCollection({ schema: docsSchema() }),
6+
};

‎src/content/docs/guides/example.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Example Guide
3+
description: A guide in my new Starlight docs site.
4+
---
5+
6+
Guides lead a user through a specific task they want to accomplish, often with a sequence of steps.
7+
Writing a good guide requires thinking about what your users are trying to do.
8+
9+
## Further reading
10+
11+
- Read [about how-to guides](https://diataxis.fr/how-to-guides/) in the Diátaxis framework

‎src/content/docs/index.mdx

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Welcome to Starlight
3+
description: Get started building your docs site with Starlight.
4+
template: splash
5+
hero:
6+
tagline: Congrats on setting up a new Starlight project!
7+
image:
8+
file: ../../assets/houston.webp
9+
actions:
10+
- text: Example Guide
11+
link: /guides/example/
12+
icon: right-arrow
13+
- text: Read the Starlight docs
14+
link: https://starlight.astro.build
15+
icon: external
16+
variant: minimal
17+
---
18+
19+
import { Card, CardGrid } from '@astrojs/starlight/components';
20+
21+
## Next steps
22+
23+
<CardGrid stagger>
24+
<Card title="Update content" icon="pencil">
25+
Edit `src/content/docs/index.mdx` to see this page change.
26+
</Card>
27+
<Card title="Add new content" icon="add-document">
28+
Add Markdown or MDX files to `src/content/docs` to create new pages.
29+
</Card>
30+
<Card title="Configure your site" icon="setting">
31+
Edit your `sidebar` and other config in `astro.config.mjs`.
32+
</Card>
33+
<Card title="Read the docs" icon="open-book">
34+
Learn more in [the Starlight Docs](https://starlight.astro.build/).
35+
</Card>
36+
</CardGrid>

‎src/content/docs/reference/example.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Example Reference
3+
description: A reference page in my new Starlight docs site.
4+
---
5+
6+
Reference pages are ideal for outlining how things work in terse and clear terms.
7+
Less concerned with telling a story or addressing a specific use case, they should give a comprehensive outline of what you're documenting.
8+
9+
## Further reading
10+
11+
- Read [about reference](https://diataxis.fr/reference/) in the Diátaxis framework

‎src/env.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// <reference path="../.astro/types.d.ts" />
2+
/// <reference types="astro/client" />

‎tsconfig.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "astro/tsconfigs/strict"
3+
}

‎yarn.lock

Whitespace-only changes.

0 commit comments

Comments
 (0)
Please sign in to comment.