Skip to content

Commit 87fcca1

Browse files
authored
Merge pull request #3 from ahoy-cli/develop
Build out new ahoy docs website for v3 release
2 parents 19987de + 7c1619a commit 87fcca1

29 files changed

Lines changed: 3129 additions & 23 deletions

.github/workflows/deploy-docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: "docs-${{ github.ref }}"
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
22+
with:
23+
persist-credentials: false
24+
25+
- name: Setup Bun
26+
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
27+
with:
28+
bun-version: latest
29+
30+
- name: Setup Pages
31+
if: github.event_name != 'pull_request'
32+
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4
33+
34+
- name: Install dependencies
35+
run: bun install --frozen-lockfile
36+
37+
- name: Build documentation
38+
run: bun run build
39+
40+
- name: Upload Pages artifact
41+
if: github.event_name != 'pull_request'
42+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
43+
with:
44+
path: ./dist
45+
46+
deploy:
47+
if: github.event_name != 'pull_request'
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
needs: build
53+
permissions:
54+
pages: write
55+
id-token: write
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4

.github/workflows/zizmor.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: GitHub Actions Security Analysis with zizmor 🌈
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
permissions: {}
10+
11+
jobs:
12+
zizmor:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
19+
with:
20+
persist-credentials: false
21+
22+
- name: Run zizmor 🌈
23+
run: pip install zizmor && zizmor .

.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

.oxfmtrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"ignorePatterns": ["**/*.mdx", "**/*.yml", "**/*.yaml"]
4+
}

LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

astro-starlight-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).

astro.config.mjs

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
site: "https://ahoy-cli.github.io",
8+
integrations: [
9+
starlight({
10+
title: "Ahoy",
11+
description:
12+
"Create self-documenting CLI programs with ease, using YAML files in your source tree",
13+
logo: {
14+
src: "./src/assets/logo.svg",
15+
},
16+
customCss: ["./src/styles/custom.css"],
17+
18+
social: [
19+
{
20+
icon: "github",
21+
href: "https://github.com/ahoy-cli/ahoy",
22+
label: "GitHub",
23+
},
24+
],
25+
sidebar: [
26+
{
27+
label: "Getting Started",
28+
items: [
29+
{ label: "Installation & Setup", slug: "guides/getting-started" },
30+
{ label: "Next Steps", slug: "guides/next-steps" },
31+
{
32+
label: "Shell Autocompletion",
33+
slug: "guides/shell-autocompletion",
34+
},
35+
],
36+
},
37+
{
38+
label: "Guides",
39+
items: [
40+
{ label: "Writing Commands", slug: "guides/writing-commands" },
41+
{ label: "Command Execution", slug: "guides/command-execution" },
42+
{ label: "Importing & Overriding", slug: "guides/importing" },
43+
{ label: "Environment", slug: "guides/environment" },
44+
],
45+
},
46+
{
47+
label: "Reference",
48+
items: [
49+
{ label: "CLI Reference", slug: "reference/cli" },
50+
{ label: "Environment Reference", slug: "reference/environment" },
51+
{ label: "YAML Schema", slug: "reference/yaml-schema" },
52+
],
53+
},
54+
],
55+
}),
56+
],
57+
});

0 commit comments

Comments
 (0)