wiki/README.md

73 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

2022-12-29 12:10:14 -08:00
# Wiki
2023-04-28 01:50:52 -07:00
This is the source code for the FOME Wiki - [wiki.fome.tech](https://wiki.fome.tech).
2022-12-29 12:10:14 -08:00
2023-04-28 01:50:52 -07:00
## Development
2022-12-29 12:10:14 -08:00
2023-04-28 01:50:52 -07:00
FOME Wiki is built using [Docusaurus 2](https://docusaurus.io/).
### Installation
Required [Node.js](https://nodejs.dev/) is defined in [.nvmrc](/.nvmrc). If you use [nvm](https://github.com/nvm-sh/nvm), run `nvm use` to switch to the correct version.
To install dependencies, run:
2022-12-29 12:10:14 -08:00
```bash
npm install
```
2023-04-28 01:50:52 -07:00
### Local Development
2022-12-29 12:10:14 -08:00
```bash
npm start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
2022-12-29 13:53:33 -08:00
Docusaurus guides: [https://docusaurus.io/docs/category/guides](https://docusaurus.io/docs/category/guides)
2023-04-28 01:50:52 -07:00
#### Lint code
2023-03-02 03:10:59 -08:00
```bash
npm run lint
2023-09-14 13:19:57 -07:00
npm run lint:fix
2023-03-02 03:10:59 -08:00
```
2023-04-28 01:50:52 -07:00
### Build
2022-12-29 12:10:14 -08:00
```bash
2023-05-30 01:39:14 -07:00
npm run build
2022-12-29 12:10:14 -08:00
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
2023-06-02 04:30:28 -07:00
### Redirection
Some addresses have client-side redirection set up here: [docusaurus.config.js](/docusaurus.config.js) (section `redirects: [...]`).
Those addresses come from the INI files (TS & HT). This gives more flexibility when wiki pages are moved or renamed.
Example:
```bash
https://wiki.fome.tech/r/fuel -> https://wiki.fome.tech/category/fuel/
```
2023-04-28 01:50:52 -07:00
### Generate PDF
2022-12-29 12:10:14 -08:00
2022-12-29 13:39:25 -08:00
Required [Prince XML](https://www.princexml.com/).
2022-12-29 12:10:14 -08:00
Build and serve docs locally before generating PDF:
```bash
npm run build
npm run serve
```
2023-04-28 01:50:52 -07:00
In another terminal, run this to generate PDF:
2022-12-29 12:10:14 -08:00
```bash
npm run pdf
```