2022-02-02 08:19:59 -08:00
|
|
|
# Drift documentation
|
2019-08-01 11:56:23 -07:00
|
|
|
|
2022-02-02 08:19:59 -08:00
|
|
|
Welcome to the source of drift's documentation, live at drift.simonbinder.eu.
|
2021-03-12 12:14:45 -08:00
|
|
|
We use a static site generator based on `build_runner` to build the documentation.
|
2019-08-01 11:56:23 -07:00
|
|
|
|
|
|
|
## Running the website locally
|
2021-03-12 12:14:45 -08:00
|
|
|
|
|
|
|
For a fast edit-refresh cycle, run
|
|
|
|
|
2019-08-01 11:56:23 -07:00
|
|
|
```
|
2021-07-08 03:28:52 -07:00
|
|
|
dart pub global run webdev serve --auto refresh pages:9999 web:8080
|
2021-03-12 12:14:45 -08:00
|
|
|
```
|
|
|
|
|
|
|
|
You can ignore the `pages:9999` (or use any other port), it's just required
|
|
|
|
so that the build system actually generates pages.
|
|
|
|
|
|
|
|
## Building the website
|
|
|
|
|
|
|
|
To build the website, first run
|
|
|
|
|
2019-08-01 11:56:23 -07:00
|
|
|
```
|
2021-03-12 12:14:45 -08:00
|
|
|
dart run build_runner build --release
|
|
|
|
```
|
|
|
|
|
|
|
|
To then copy generated contents into a directory, use:
|
|
|
|
|
|
|
|
```
|
|
|
|
dart run build_runner build --release --output web:out
|
|
|
|
```
|
|
|
|
|
|
|
|
Where `out` is the desired output directory.
|
|
|
|
Note that both steps are necessary since the build system doesn't re-generate
|
|
|
|
pages otherwise.
|