chore: update README with deploy details
This commit is contained in:
parent
006e047fe1
commit
d9f2131a88
1 changed files with 25 additions and 14 deletions
39
README.md
39
README.md
|
@ -1,13 +1,28 @@
|
||||||
# Systems Obscure
|
# Systems Obscure
|
||||||
|
|
||||||
[](https://forgejo.systemsobscure.net/thomasabishop/systems-obscure/actions)
|
|
||||||
|
|
||||||
> My personal blog at
|
> My personal blog at
|
||||||
> [https://systemsobscure.net](https://www.systemsobscure.net)
|
> [https://systemsobscure.net](https://www.systemsobscure.net)
|
||||||
|
|
||||||
|
## Pre-build
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build:posts
|
||||||
|
```
|
||||||
|
|
||||||
|
Parse Markdown blog posts in `/posts` and generate JSON index which is used to
|
||||||
|
populate core content.
|
||||||
|
|
||||||
|
## Development server
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build:posts
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
npm run build:posts
|
||||||
npm run build
|
npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -17,17 +32,13 @@ transpilation of TSX to JSX. I am using TypeScript so that I can use the
|
||||||
about types in this project and all my components are written as JSX. SWC
|
about types in this project and all my components are written as JSX. SWC
|
||||||
transpiles very quickly without throwing TS warning and errors.
|
transpiles very quickly without throwing TS warning and errors.
|
||||||
|
|
||||||
I still use Vite's native `esbuild` for HMR transpilation in development.
|
## Deploy
|
||||||
|
|
||||||
## Scripts
|
Deployment automated via
|
||||||
|
[Forgejo action](https://forgejo.org/docs/next/user/actions/reference/). See
|
||||||
|
[deploy.yml](https://forgejo.systemsobscure.net/thomasabishop/systems-obscure/src/branch/main/.forgejo/workflows/deploy.yaml).
|
||||||
|
|
||||||
### Generate post index
|
Runs the build script, then transfers transpiled `dist/` directory to my
|
||||||
|
[Virtual Private Server](https://forgejo.systemsobscure.net/thomasabishop/self-host)
|
||||||
```sh
|
from where it is served at
|
||||||
npm run build:posts
|
[systemsobscure.blog](https://www.systemsobscure.blog).
|
||||||
```
|
|
||||||
|
|
||||||
This runs `scripts/generate-post-index.js` which reads all raw Markdown posts in
|
|
||||||
`/posts` and parses the body content and YAML front-matter. It then writes this
|
|
||||||
data to `public/post-index.json` which is read by the React application at
|
|
||||||
runtime.
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue