-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replatform docs site to Astro + Starlight
I tried to resist the temptation to fix other tech debt here (untyped JS, etc.).
- Loading branch information
Showing
55 changed files
with
7,769 additions
and
23,857 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,9 +22,8 @@ vendor | |
/.netlify | ||
|
||
# site | ||
test-site | ||
site/dist | ||
site-cra | ||
site/.astro/ | ||
site/src/**/*.md | ||
|
||
# tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI api command | ||
sidebar: | ||
label: api | ||
--- | ||
|
||
# `api` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI blobs command | ||
sidebar: | ||
label: blobs | ||
description: Manage objects in Netlify Blobs | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI build command | ||
sidebar: | ||
label: build | ||
--- | ||
|
||
# `build` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI deploy command | ||
sidebar: | ||
label: deploy | ||
--- | ||
|
||
# `deploy` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI dev command | ||
sidebar: | ||
label: dev | ||
description: Run netlify dev locally | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI functions command | ||
sidebar: | ||
label: functions | ||
description: Run netlify dev locally | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI init command | ||
sidebar: | ||
label: init | ||
description: Initialize a new site locally | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI login command | ||
sidebar: | ||
label: login | ||
description: Login to your Netlify account | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI logs command | ||
sidebar: | ||
label: logs | ||
--- | ||
|
||
# `logs` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI open command | ||
sidebar: | ||
label: open | ||
--- | ||
|
||
# `open` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI recipes command | ||
sidebar: | ||
label: recipes | ||
--- | ||
|
||
# `recipes` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
--- | ||
title: Netlify CLI watch command | ||
sidebar: | ||
label: watch | ||
description: Watch for site deploy to finish | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Netlify CLI docs site | ||
|
||
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build) | ||
|
||
## Architecture | ||
|
||
All the command reference pages and the list of commands are automatically generated from the CLI code. This is | ||
automatically inserted into the existing, committed, semi-manually-written pages in `../docs/`. Here's how the flow | ||
works: | ||
|
||
1. The `docs.js` script replaces the content between the auto-generation marker comments in the files in `../docs/`; the | ||
rest you can update manually. | ||
2. The `sync.js` script copies these over to this Astro Starlight site, into `src/content/docs/`. It may also perform | ||
some minor transformations. | ||
3. From there, it's any old Astro/Starlight docs site, as documented. | ||
|
||
## π Project Structure | ||
|
||
Inside of your Astro + Starlight project, you'll see the following folders and files: | ||
|
||
``` | ||
. | ||
βββ public/ | ||
βββ src/ | ||
β βββ assets/ | ||
β βββ content/ | ||
β β βββ docs/ | ||
β βββ content.config.ts | ||
βββ astro.config.mjs | ||
βββ package.json | ||
βββ tsconfig.json | ||
``` | ||
|
||
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. | ||
|
||
Images can be added to `src/assets/` and embedded in Markdown with a relative link. | ||
|
||
Static assets, like favicons, can be placed in the `public/` directory. | ||
|
||
## π§ Commands | ||
|
||
All commands are run from the root of the project, from a terminal: | ||
|
||
| Command | Action | | ||
| :---------------------- | :--------------------------------------------------------------------------------- | | ||
| `npm install` | Installs dependencies | | ||
| `npm run dev` | Starts local dev server at `localhost:4321` | | ||
| `npm run build:docs-md` | Generate the Markdown command pages from code | | ||
| `npm run build:docs-md` | Generate the Markdown command pages from code and sync them into this site's pages | | ||
| `npm run build` | Build your production site to `./dist/` | | ||
| `npm run preview` | Preview your build locally, before deploying | | ||
|
||
## π Want to learn more? | ||
|
||
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). |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.