2024-01-11 20:29:15 -05:00
# Blog in a Matrix
2024-01-11 11:44:21 -05:00
2024-01-11 20:29:15 -05:00
New blog site using [Astro ](https://astro.build/ ).
2024-01-11 11:44:21 -05:00
2024-01-11 20:29:15 -05:00
## Workflow
2024-01-11 13:16:24 -05:00
2024-01-11 20:29:15 -05:00
Articles are written in markdown or MDX (I am using [Joplin ](https://github.com/laurent22/joplin/ )) then exported to `/src/content/blog` . The site can render [$\KaTeX$ ](https://katex.org/ ) and [Mermaid ](https://mermaid.js.org/ ) content.
2024-01-11 13:16:24 -05:00
2024-01-11 20:29:15 -05:00
## Development
2024-01-11 13:16:24 -05:00
2024-01-11 20:29:15 -05:00
### Setup
2024-01-11 11:44:21 -05:00
2024-01-11 20:29:15 -05:00
Install dependencies:
2024-01-11 11:44:21 -05:00
2024-01-11 20:29:15 -05:00
```sh
2024-01-15 15:08:45 -05:00
pnpm install
2024-01-11 11:44:21 -05:00
```
2024-01-11 20:29:15 -05:00
### Dev Server
2024-01-11 13:16:24 -05:00
2024-01-11 20:29:15 -05:00
Start a development server using the following command:
2024-01-11 11:44:21 -05:00
2024-01-11 20:29:15 -05:00
```sh
pnpm dev --open --host
```
2024-01-11 11:44:21 -05:00
2024-01-11 20:29:15 -05:00
The site should be now accessible at [http://localhost:4321/ ](http://localhost:4321/ ). A specific port can be specified using `--port` flag.
2024-01-11 11:44:21 -05:00
2024-01-15 15:08:45 -05:00
### Build Site
2024-01-11 11:44:21 -05:00
2024-01-11 20:29:15 -05:00
Build deployable site:
2024-01-11 13:16:24 -05:00
2024-01-11 20:29:15 -05:00
```sh
2024-01-16 14:11:11 -05:00
pnpm exec playwright install
2024-01-16 15:21:53 -05:00
pnpm exec playwright install-deps # or you can manually install the dependencies
2024-01-11 20:29:15 -05:00
pnpm astro build
```
2024-01-11 13:16:24 -05:00
2024-01-11 20:29:15 -05:00
Built site can now be found at `/dist` .