Skip to content

Commit

Permalink
add website readme (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor authored Sep 25, 2024
1 parent 1408605 commit a768e43
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ jobs:
path: './api-linter'
- name: Create rules folder
run: mkdir -p src/content/docs/tooling/linter/rules
- name: Create website folder
run: mkdir -p src/content/docs/tooling/website
- name: Install all dependencies.
run: npm install
- name: Generate all static pages.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
path: './api-linter'
- name: Create rules folder
run: mkdir -p src/content/docs/tooling/linter/rules
- name: Create website folder
run: mkdir -p src/content/docs/tooling/website
- name: Install all dependencies.
run: npm install
- name: Generate all static pages.
Expand Down
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
# Starlight Starter Kit: Basics
# AEP Site Generator

[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
## Overview

```
npm create astro@latest -- --template starlight
```
The AEP Site Generator takes in all of our documentation from multiple
repositories and generates the AEP website.

The site generator is made of multiple parts:

[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
[![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)
[![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)
* A CI workflow
* A generator script that reads the various repos + converts their
documentation to formats supported by Starlight
* A (very standard) [Starlight](https://starlight.astro.build) website.

> πŸ§‘β€πŸš€ **Seasoned astronaut?** Delete this file. Have fun!
## Generator

## πŸš€ Project Structure
The generator script reads documentation from all of the repos and writes files
for Starlight to read.

Inside of your Astro + Starlight project, you'll see the following folders and files:
At a high level, the generator script writes out Markdown / MDX (Markdown with
React added) files to src/content/docs for Starlight to read. It also generates
various JSON files in generated/ to build the sidebar and other config.

## πŸš€ Starlight Project Structure

```
.
β”œβ”€β”€ public/
β”œβ”€β”€ scripts/
β”‚ β”œβ”€β”€ generate.ts
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ assets/
β”‚ β”œβ”€β”€ content/
Expand Down Expand Up @@ -50,6 +58,3 @@ All commands are run from the root of the project, from a terminal:
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |

## πŸ‘€ 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).
3 changes: 3 additions & 0 deletions scripts/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ sidebar = await writePages(AEP_LOC, sidebar);
// Write linter pages.
await writePage(AEP_LINTER_LOC, "README.md", "src/content/docs/tooling/linter/index.md", "Protobuf Linter")

// Write site generator.
await writePage(".", "README.md", "src/content/docs/tooling/website/index.md", "")
writeSidebar(sidebar, "sidebar.json");

// Write out linter rules.
Expand All @@ -307,6 +309,7 @@ for (var rule of consolidated_rules) {
}

var linter_sidebar = buildLinterSidebar(consolidated_rules);
addToSidebar(linter_sidebar, "Tooling", [{label: "Website", link: "tooling/website"}]);
writeSidebar(linter_sidebar, "linter_sidebar.json");

buildIndexPage(aeps);
Expand Down

0 comments on commit a768e43

Please sign in to comment.