Skip to content

Commit 4fdab2e

Browse files
committed
Remove the last Docusaurus leftovers
src/css/custom.scss was the old theme's stylesheet and nothing imported it since the rewrite; the .docusaurus cache directory and its gitignore entries are gone too. The README described a Docusaurus site and now describes what is actually here, including how to add a translation. The specs under specs/012-website-i18n-docs/ still describe the Docusaurus i18n setup. They are a record of a past decision rather than live documentation, so they are left alone.
1 parent c8a2e50 commit 4fdab2e

3 files changed

Lines changed: 46 additions & 146 deletions

File tree

website/.gitignore

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
# Dependencies
22
/node_modules
33

4-
# Production
5-
/build
6-
7-
# Generated files
8-
.docusaurus
9-
.cache-loader
4+
# Build output
5+
dist
6+
.ssr
107

118
# Misc
129
.DS_Store
@@ -18,5 +15,3 @@
1815
npm-debug.log*
1916
yarn-debug.log*
2017
yarn-error.log*
21-
dist
22-
.ssr

website/README.md

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,61 @@
1-
# Website
1+
# GoZen website
22

3-
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
3+
The project site for [gozen.dev](https://gozen.dev): a home page and the
4+
documentation, in eleven languages.
45

5-
## Installation
6+
Built with React 19 and Vite, on the same architecture as the other dopejs
7+
sites. Routes are language-neutral and pre-rendered to static HTML; every
8+
translation ships in the page payload and the visitor's language is resolved on
9+
the client.
610

7-
```bash
8-
yarn
9-
```
11+
## Develop
1012

11-
## Local Development
13+
Prerequisites: Node.js 22+, pnpm 10+.
1214

1315
```bash
14-
yarn start
16+
pnpm install
17+
pnpm dev # http://localhost:5173
18+
pnpm typecheck # must stay at zero errors
19+
pnpm build # static output in dist/
20+
pnpm preview
1521
```
1622

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.
18-
19-
## Build
23+
`pnpm build` runs the client build, then an SSR build, then renders each route
24+
to static HTML with its payload embedded, and finally writes the sitemap.
2025

21-
```bash
22-
yarn build
23-
```
26+
## Content
2427

25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
28+
Documents live in `content/`: English at the root, every other locale in
29+
`content/<locale>/`. Order and grouping in the sidebar come from
30+
`src/sidebar.ts`, not from the file system. Markdown is compiled by
31+
`content.mjs` with markdown-it, and code fences are highlighted at build time by
32+
Shiki, so no highlighter is shipped to the browser.
2633

27-
## Deployment
34+
Interface strings live in `src/i18n/<locale>.json`, keyed the same way across
35+
locales; English is the source and any missing key falls back to it.
2836

29-
Using SSH:
37+
To translate a document, use the helper rather than editing by hand:
3038

3139
```bash
32-
USE_SSH=true yarn deploy
40+
python3 tools/translate-doc.py <slug> <locale> <map.json>
3341
```
3442

35-
Not using SSH:
43+
It copies code fences verbatim and fails if any prose line is missing from the
44+
map, so a file cannot ship half-translated by accident.
3645

37-
```bash
38-
GIT_USER=<Your GitHub username> yarn deploy
39-
```
46+
> Translations are machine-generated and have not been reviewed by native
47+
> speakers. Replacing any file under `content/<locale>/` with a reviewed
48+
> translation needs no code change.
49+
50+
## Language preference
51+
52+
There are no per-language URLs. `src/language-preference.ts` resolves the
53+
language from `localStorage["dopejs.locale"]`, then the `dopejs_locale` cookie,
54+
then `navigator.languages`. The module is shared with the dopejs.com sites, but
55+
gozen.dev is a different registrable domain, so the cookie stays host-only here
56+
and the preference does not follow visitors between the two.
57+
58+
## Deploy
4059

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.
60+
Pushing to `main` runs `.github/workflows/pages.yml`, which type-checks, builds
61+
and publishes `dist/` to GitHub Pages.

website/src/css/custom.scss

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

0 commit comments

Comments
 (0)