https://github.com/codeweiz/microboat-blog
microboat's blog
https://github.com/codeweiz/microboat-blog
agent ai backend blog frontend infra
Last synced: 27 days ago
JSON representation
microboat's blog
- Host: GitHub
- URL: https://github.com/codeweiz/microboat-blog
- Owner: codeweiz
- Created: 2026-05-28T11:09:46.000Z (29 days ago)
- Default Branch: main
- Last Pushed: 2026-05-28T12:44:49.000Z (29 days ago)
- Last Synced: 2026-05-28T13:22:21.205Z (29 days ago)
- Topics: agent, ai, backend, blog, frontend, infra
- Language: TypeScript
- Homepage: https://blog.micro-boat.com
- Size: 1.43 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Microboat Blog
[](https://github.com/codeweiz/microboat-blog/actions/workflows/deploy.yml)
Personal blog on Next.js 16 + Cloudflare Workers. Forked & stripped from [nextdevkit-cloudflare-template](https://github.com/codeweiz/nextdevkit-cloudflare-template).
đ Live: **https://blog.micro-boat.com**
Every push to `main` ships to Cloudflare Workers via GitHub Actions. Day-to-day, you write a post, commit, push â that's it.
## Stack
- **Next.js 16** App Router + Turbopack
- **MDX** content via `fumadocs-mdx` (frontmatter-driven posts in `src/content/blog/`)
- **Tailwind v4** + shadcn/ui + `next-themes` (light/dark)
- **next-intl** for English / įŽäŊ䏿
- **Giscus** comments backed by GitHub Discussions
- **RSS** feed at `/rss.xml`
- **OpenNext** deploying to Cloudflare Workers
## Develop
```bash
pnpm install
pnpm dev # http://localhost:3000
```
## Add a post
Drop a Markdown file in `src/content/blog/`:
- `my-post.mdx` â English
- `my-post.zh.mdx` â Chinese (optional)
Frontmatter schema lives in `source.config.ts`. Then commit & push â GitHub Actions deploys automatically.
## Publish a post
```bash
# write
vim src/content/blog/my-new-post.mdx
# ship
git add . && git commit -m "blog: my new post"
git push
```
GitHub Actions runs `install â lint â opennext build â wrangler deploy`. Live in ~1â2 min. Watch progress at https://github.com/codeweiz/microboat-blog/actions.
## Deploy pipeline
Already configured on this repo:
- **Workflow:** [`.github/workflows/deploy.yml`](./.github/workflows/deploy.yml) â runs on push to `main` and on manual dispatch
- **Secrets** (set on the repo): `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID`
- **Worker name:** `microboat-blog` (in `wrangler.jsonc`)
### If you fork this repo
1. **Create a Cloudflare API token** â https://dash.cloudflare.com/profile/api-tokens â "Edit Cloudflare Workers" template
2. **Find your Account ID** â right sidebar of any Worker page in the Cloudflare dashboard
3. **Add Actions secrets** â `Settings â Secrets and variables â Actions`:
- `CLOUDFLARE_API_TOKEN`
- `CLOUDFLARE_ACCOUNT_ID`
4. **Update `wrangler.jsonc`** â change `name` to your own Worker name
5. Push to `main` â CI takes it from there
### Deploy from your laptop
```bash
pnpm wrangler login # one-time browser auth
pnpm preview # preview the prod worker bundle locally
pnpm deploy # build + deploy bypassing CI
```
## Configuration
- Site identity: `src/config/index.ts` (`metadata.name`, `title`, `description`, âĻ)
- Production URL: `.env.production` (`NEXT_PUBLIC_APP_URL`)
- Worker name / bindings: `wrangler.jsonc`
- Locales: `src/config/index.ts` â `i18n.locales`, plus `messages/{en,zh}.json`
- Comments: `src/components/blog/giscus.tsx` (repo, repoId, category, categoryId)
## Comments (Giscus)
Comments use [Giscus](https://giscus.app) on top of GitHub Discussions.
If you fork this repo:
1. **Enable Discussions** â `gh api -X PATCH repos/OWNER/REPO -f has_discussions=true`
2. **Install the Giscus app** â https://github.com/apps/giscus (grant access to your repo)
3. **Get IDs** for your repo + category:
```bash
gh api repos/OWNER/REPO --jq .node_id
gh api graphql -f query='{ repository(owner:"OWNER", name:"REPO"){ discussionCategories(first:20){ nodes { id name } } } }'
```
4. **Update** `src/components/blog/giscus.tsx` with your `repo`, `repoId`, `category`, `categoryId`