For development
Run Server
$ pnpm dev -- -p 8080
# Specify host to bind
$ pnpm dev -- -H mydomain.example -p 8080
Requirements
- nvm / ASDF (optional, but recommended), or Node.js v16 (requires Corepack enabled)
Commands
Command | Description |
---|---|
pnpm build |
Builds blog and feeds. |
pnpm dev |
Starts development server. |
Directories
public/images/
... Image files which is used by posts.contents/[locale]/
... Post markdown files.
Markdown Extensions
List of custom elements
These elements going to be converted to React components at runtime.
<blog-alert>
Alert component.
Prop Name | Type | Description |
---|---|---|
variant |
"info" | "tips" | "note" | "warning" | "danger" |
Severity of the alert. |
<blog-alert variant="tips">
Blah Blah _Blah_
</blog-alert>
<blog-youtube>
Embed Youtube video.
Prop Name | Type | Description |
---|---|---|
src |
string |
Same for normal embed. |
aspectratio |
string |
Defaults to 16:9 |
<blog-youtube src="https://www.youtube.com/embed/dQw4w9WgXcQ" aspectratio="3:2"></blog-youtube>
Environments Variables
For deploy.
Name | Required? |
---|---|
AWS_ACCESS_KEY_ID |
Yes |
AWS_SECRET_ACCESS_KEY |
Yes |
AWS_BUCKET_NAME |
Yes |
AWS_CF_DIST_ID |
Yes |