Skip to content

Commit 49a3085

Browse files
authored
feat: new documentation (#149)
1 parent f0f50e2 commit 49a3085

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1030
-638
lines changed

.github/workflows/deploy-docs.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,12 @@ jobs:
3737
- name: Upload Build Artifact
3838
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
3939
with:
40-
path: docs/build/
40+
path: docs/dist/
4141

4242
deploy:
4343
name: Deploy to GitHub Pages
4444
needs: build
4545

46-
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
4746
permissions:
4847
pages: write # to deploy to Pages
4948
id-token: write # to verify the deployment originates from an appropriate source

.prettierrc

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@
33
"singleQuote": true,
44
"useTabs": false,
55
"trailingComma": "all",
6-
"plugins": ["prettier-plugin-svelte"],
6+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-astro"],
77
"overrides": [
88
{
99
"files": "*.svelte",
1010
"options": {
1111
"parser": "svelte"
1212
}
13+
},
14+
{
15+
"files": "*.astro",
16+
"options": {
17+
"parser": "astro"
18+
}
1319
}
1420
]
1521
}

bun.lockb

1.78 KB
Binary file not shown.

docker/development/compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
timeout: 5s
1818
retries: 5
1919
ports:
20-
- "5432:5432"
20+
- '5432:5432'
2121

2222
volumes:
2323
db_data:

docs/.gitignore

+16-15
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
# Dependencies
2-
/node_modules
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
35

4-
# Production
5-
/build
6-
7-
# Generated files
8-
.docusaurus
9-
.cache-loader
10-
11-
# Misc
12-
.DS_Store
13-
.env.local
14-
.env.development.local
15-
.env.test.local
16-
.env.production.local
6+
# dependencies
7+
node_modules/
178

9+
# logs
1810
npm-debug.log*
1911
yarn-debug.log*
2012
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/README.md

+37-23
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,55 @@
1-
# Website
1+
# Starlight Starter Kit: Basics
22

3-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4-
5-
### Installation
3+
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
64

75
```
8-
$ yarn
6+
npm create astro@latest -- --template starlight
97
```
108

11-
### Local Development
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)
1213

13-
```
14-
$ yarn start
15-
```
14+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
1615
17-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
16+
## 🚀 Project Structure
1817

19-
### Build
18+
Inside of your Astro + Starlight project, you'll see the following folders and files:
2019

2120
```
22-
$ yarn build
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
2332
```
2433

25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
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.
2635

27-
### Deployment
36+
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
2837

29-
Using SSH:
38+
Static assets, like favicons, can be placed in the `public/` directory.
3039

31-
```
32-
$ USE_SSH=true yarn deploy
33-
```
40+
## 🧞 Commands
3441

35-
Not using SSH:
42+
All commands are run from the root of the project, from a terminal:
3643

37-
```
38-
$ GIT_USER=<Your GitHub username> yarn deploy
39-
```
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?
4054

41-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
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).

docs/astro.config.mjs

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
// @ts-check
2+
import react from '@astrojs/react';
3+
import starlight from '@astrojs/starlight';
4+
import tailwind from '@astrojs/tailwind';
5+
import { defineConfig } from 'astro/config';
6+
import starlightImageZoom from 'starlight-image-zoom';
7+
import starlightLinksValidator from 'starlight-links-validator';
8+
9+
// https://astro.build/config
10+
export default defineConfig({
11+
site: 'https://airtrail.johan.ohly.dk',
12+
integrations: [
13+
starlight({
14+
title: 'AirTrail',
15+
description: 'A modern, open-source personal flight tracking system',
16+
logo: {
17+
dark: '@/assets/airtrail-logo-light.png',
18+
light: '@/assets/airtrail-logo.png',
19+
},
20+
customCss: ['@/styles/globals.css'],
21+
social: {
22+
github: 'https://github.com/johanohly/AirTrail',
23+
},
24+
sidebar: [
25+
{
26+
label: 'Overview',
27+
items: [
28+
'docs/overview/introduction',
29+
'docs/overview/quick-start',
30+
'docs/overview/contributing',
31+
],
32+
},
33+
{
34+
label: 'Install',
35+
items: [
36+
'docs/install/requirements',
37+
'docs/install/one-click',
38+
'docs/install/docker-compose',
39+
'docs/install/portainer',
40+
'docs/install/synology',
41+
'docs/install/manual',
42+
'docs/install/post-installation',
43+
'docs/install/updating',
44+
],
45+
},
46+
{
47+
label: 'Features',
48+
items: [
49+
'docs/features/add-flight',
50+
'docs/features/statistics',
51+
'docs/features/import',
52+
'docs/features/export',
53+
'docs/features/oauth',
54+
],
55+
},
56+
{
57+
label: 'Development',
58+
items: ['docs/development/contributing-guidelines'],
59+
},
60+
],
61+
lastUpdated: true,
62+
editLink: {
63+
baseUrl: 'https://github.com/johanohly/AirTrail/edit/main/docs',
64+
},
65+
favicon: '/favicon.png',
66+
plugins: [
67+
starlightLinksValidator({ errorOnRelativeLinks: false }),
68+
starlightImageZoom(),
69+
],
70+
components: {
71+
SocialIcons: '@/components/overrides/SocialIcons.astro',
72+
Banner: '@/components/overrides/Banner.astro',
73+
},
74+
disable404Route: true,
75+
}),
76+
react(),
77+
tailwind({
78+
applyBaseStyles: false,
79+
}),
80+
],
81+
});

docs/babel.config.js

-3
This file was deleted.

docs/bun.lockb

-278 KB
Binary file not shown.

docs/components.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": false,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "tailwind.config.mjs",
8+
"css": "src/styles/globals.css",
9+
"baseColor": "zinc",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"aliases": {
14+
"components": "@/components",
15+
"utils": "@/lib/utils",
16+
"ui": "@/components/ui",
17+
"lib": "@/lib"
18+
},
19+
"iconLibrary": "lucide"
20+
}

docs/docs/development/_category_.json

-4
This file was deleted.

docs/docs/development/contributing-guidelines.md

-7
This file was deleted.

docs/docs/features/_category_.json

-4
This file was deleted.

docs/docs/install/_category_.json

-4
This file was deleted.

docs/docs/install/docker-compose.md

-58
This file was deleted.

docs/docs/install/portainer.md

-29
This file was deleted.

docs/docs/install/synology.md

-7
This file was deleted.

docs/docs/overview/_category_.json

-4
This file was deleted.

0 commit comments

Comments
 (0)