Skip to content

Commit 49ae2db

Browse files
authored
chore: retire Docusaurus site, rewrite README for the Astro docs (#403)
chore: retire Docusaurus site, rewrite README for the Astro docs
2 parents b856402 + 2d1eed5 commit 49ae2db

108 files changed

Lines changed: 54 additions & 25853 deletions

File tree

Some content is hidden

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

.github/workflows/test-deploy.yaml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
1-
name: Test deployment
1+
name: Test build
22

33
on:
44
pull_request:
55
branches:
6-
- main
7-
# Review gh actions docs if you want to further define triggers, paths, etc
8-
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
6+
- master
97

108
jobs:
11-
test-deploy:
12-
name: Test deployment
9+
test-build:
10+
name: Test build (docs site)
1311
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
1414
steps:
1515
- uses: actions/checkout@v5
1616
- uses: actions/setup-node@v6
1717
with:
1818
node-version: 24
19-
cache: yarn
19+
cache: npm
20+
cache-dependency-path: site/package-lock.json
2021

2122
- name: Install dependencies
22-
run: yarn install --frozen-lockfile
23-
working-directory: website
24-
- name: Test build website
25-
run: yarn build
26-
working-directory: website
23+
run: npm ci --ignore-scripts
24+
working-directory: site
25+
- name: Test build
26+
run: npm run build
27+
working-directory: site
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ test:
22
go test -race ./...
33

44
serve:
5-
docker run --rm -it --name echo-docs -v ${CURDIR}/website:/home/app -w /home/app -p 3000:3000 -u node node:lts /bin/bash -c "npm install && npm start -- --host=0.0.0.0"
5+
cd site && npm install && npm run dev
66

77
.PHONY: test serve

README.md

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,51 @@
1-
# Echo Extra
1+
# echox
22

3-
### Running Recipes
3+
Source for the [Echo](https://github.com/labstack/echo) documentation site —
4+
published at **[echo.labstack.com](https://echo.labstack.com)** — together with
5+
the runnable cookbook recipes the docs reference.
46

5-
- Go into any cookbook folder and run `go run server.go`
7+
## Layout
68

7-
### Running/Developing Website Locally
9+
| Path | What it is |
10+
| ----------- | --------------------------------------------------------------------------------------------------- |
11+
| `site/` | The docs site — [Astro](https://astro.build) + [Starlight](https://starlight.astro.build). Content lives in `site/src/content/docs/`. |
12+
| `cookbook/` | Standalone, runnable Go example apps referenced from the docs. |
13+
| `docs/` | Internal design specs. |
814

9-
- Ensure that you have Node.js installed on your computer. If you don't have it, download and install it from the
10-
official Node.js website (https://nodejs.org). Or you could use NVM (https://github.com/nvm-sh/nvm) to use appropriate
11-
version of Node.
12-
- Inside the `website` folder, install the required dependencies by running the following command `npm install`.
13-
- Run the website locally by running the following command `npm start`.
15+
## Documentation site
16+
17+
Requires [Node.js](https://nodejs.org) (LTS).
1418

1519
```bash
16-
cd website
20+
cd site
1721
npm install
18-
npm start
22+
npm run dev # dev server at http://localhost:4321
23+
npm run build # production build to site/dist
24+
npm run preview # preview the production build
1925
```
2026

21-
### Running/Developing Website in docker
27+
Content is Markdown/MDX under `site/src/content/docs/` (`guide/`, `middleware/`,
28+
`cookbook/`). To add a page, drop a file in the right folder — the sidebar is
29+
generated from each page's `sidebar.order` frontmatter. Every page needs a
30+
`title` and `description`.
31+
32+
## Cookbook recipes
2233

23-
This will serve website on http://localhost:3000/
34+
Each folder under `cookbook/` is a self-contained example. Run one with:
2435

2536
```bash
26-
docker run --rm -it --name echo-docs -v ${PWD}/website:/home/app -w /home/app -p 3000:3000 -u node node:lts /bin/bash -c "npm install && npm start -- --host=0.0.0.0"
37+
cd cookbook/hello-world
38+
go run .
2739
```
40+
41+
## Deployment
42+
43+
The site auto-deploys to GitHub Pages on every push to `master` (and once daily,
44+
to refresh build-time data such as the GitHub star count) via
45+
[`.github/workflows/deploy.yaml`](.github/workflows/deploy.yaml). Dependencies
46+
are installed with `npm ci --ignore-scripts` and pinned via the committed
47+
lockfile.
48+
49+
## License
50+
51+
[MIT](LICENSE)

website/.gitignore

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

website/.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

website/babel.config.js

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

website/docs/cookbook/_category_.json

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

website/docs/cookbook/auto-tls.md

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

website/docs/cookbook/cors.md

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

website/docs/cookbook/crud.md

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

0 commit comments

Comments
 (0)