Chrysoblog/README.md

48 lines
925 B
Markdown
Raw Normal View History

2024-09-11 00:51:05 -07:00
# Chrysoblog
2024-09-14 00:59:54 -07:00
A blog framework
2024-09-11 00:51:05 -07:00
2024-09-14 00:59:54 -07:00
## Building
2024-09-11 00:51:05 -07:00
2024-09-14 00:59:54 -07:00
To create the production version,
2024-09-11 00:51:05 -07:00
```bash
2024-09-14 00:59:54 -07:00
npm run build
2024-09-11 00:51:05 -07:00
```
2024-09-14 00:59:54 -07:00
You can preview the production build with `npm run preview`.
2024-09-11 00:51:05 -07:00
2024-09-14 00:59:54 -07:00
### Content
2024-09-19 13:46:26 -07:00
To insert custom content, create a directory with a similar structure to
`src/content`, and set the environment variable `CHRYSOBLOG_CONTENT` to that
directory. The website will be built statically in `build/`. Note that changing
`favicon.svg` will require modifying the `static/` folder.
2024-09-14 00:59:54 -07:00
## Developing
2024-09-28 23:59:37 -07:00
Install [pre-commit](https://pre-commit.com/).
2024-09-28 15:18:09 -07:00
Install dependencies with `npm install` (or `pnpm install` or `yarn`). Then
start the dev server with
2024-09-11 00:51:05 -07:00
```bash
2024-09-14 00:59:54 -07:00
npm run dev [-- --open]
2024-09-11 00:51:05 -07:00
```
2024-09-28 15:30:11 -07:00
### Formatting
``` bash
2024-10-10 12:00:35 -07:00
npx eslint
2024-09-28 15:30:11 -07:00
```
2024-09-28 15:18:09 -07:00
### Testing
To run tests
``` bash
npx playwright test
```
All tests must have the suffix `.spec.[jt]s`. Be cautious while updating
`playwright` since the versions in `nixpkgs` and `node` must exactly match.