Skip to content

Commit 5471dd0

Browse files
committed
Scaffold astro/starlight
1 parent 5028832 commit 5471dd0

17 files changed

+4703
-17
lines changed

.github/workflows/publish.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,39 @@ env:
1111
jobs:
1212
publish:
1313
runs-on: ubuntu-latest
14-
14+
1515
permissions:
1616
contents: read
1717
packages: write
1818
attestations: write
1919
id-token: write
20-
20+
2121
steps:
2222
- uses: actions/checkout@v4
23-
23+
2424
- uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
2525
with:
2626
registry: ${{ env.REGISTRY }}
2727
username: ${{ github.actor }}
2828
password: ${{ secrets.GITHUB_TOKEN }}
29-
29+
3030
- id: meta
3131
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
3232
with:
3333
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3434
tags: |
3535
latest
36-
36+
3737
- id: push
3838
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
3939
with:
4040
context: .
4141
push: true
4242
tags: ${{ steps.meta.outputs.tags }}
4343
labels: ${{ steps.meta.outputs.labels }}
44-
45-
44+
4645
- uses: actions/attest-build-provenance@v2
4746
with:
4847
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
4948
subject-digest: ${{ steps.push.outputs.digest }}
5049
push-to-registry: true
51-

.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

+54
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).

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+
});

mise.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[tools]
2+
node = "22.13.0"
3+
"npm:pnpm" = "latest-10"

package.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "xivapi",
3+
"type": "module",
4+
"version": "0.0.1",
5+
"scripts": {
6+
"postinstall": "astro telemetry disable",
7+
"dev": "astro dev",
8+
"start": "astro dev",
9+
"build": "astro build",
10+
"preview": "astro preview",
11+
"astro": "astro"
12+
},
13+
"pnpm": {
14+
"onlyBuiltDependencies": [
15+
"sharp"
16+
]
17+
},
18+
"dependencies": {
19+
"@astrojs/starlight": "^0.31.0",
20+
"astro": "^5.1.5",
21+
"sharp": "^0.32.5"
22+
}
23+
}

0 commit comments

Comments
 (0)