docspell/website/README.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

70 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2020-07-27 20:13:22 +00:00
# Website
This is the docspell website and documentation.
## Building
The website is created using [zola](https://github.com/getzola/zola)
static site generator. The (very minimal) dynamic parts are written in
Elm.
2022-01-27 19:23:15 +00:00
Sbt is used to build the site.
2020-07-27 20:13:22 +00:00
## Development
Install things by running `yarn install`.
2024-03-10 14:36:40 +00:00
Use a dev [environment](https://docspell.org/docs/dev/development/)
and open terminal for each script below:
2022-01-27 19:23:15 +00:00
1. Starting the server
``` shell
2024-03-10 14:36:40 +00:00
cd site && zola serve
2022-01-27 19:23:15 +00:00
```
2. Building the stylesheet
``` shell
2024-03-10 14:36:40 +00:00
./scripts/run-styles.sh
2022-01-27 19:23:15 +00:00
```
3. Building some javascript files
``` shell
2024-03-10 14:36:40 +00:00
./scripts/run-elm.sh
2022-01-27 19:23:15 +00:00
```
2020-07-27 20:13:22 +00:00
Open browser at `localhost:1111`.
2020-09-02 19:44:13 +00:00
## Publishing
2022-01-27 19:23:15 +00:00
The above is great when editing, but doesn't fully reflect what will
be finally deployed. To see this, start sbt and change into the
website project.
2020-09-02 19:44:13 +00:00
``` shell
2024-03-10 14:36:40 +00:00
$ sbt
2020-09-02 19:44:13 +00:00
sbt> project website
```
2022-01-27 19:23:15 +00:00
Build everything and check for dead links:
2020-09-02 19:44:13 +00:00
``` scala
2022-01-27 19:23:15 +00:00
sbt> zolaBuildTest
2020-09-02 19:44:13 +00:00
sbt> zolaCheck
```
### Testing
``` scala
sbt> ghpagesSynchLocal
```
2022-01-27 19:23:15 +00:00
The final site is now generated and a simple http server can be used
to see how it will look when deployed.
2020-09-02 19:44:13 +00:00
``` shell
cd ~/.sbt/ghpages/<some-hash>/com.github.eikek/docspell-website
2022-01-27 19:23:15 +00:00
python -m http.server 1234
2020-09-02 19:44:13 +00:00
```
Open http://localhost:1234 in a browser.