Personal blog built with SvelteKit. Focused on fast, readable posts, clean navigation, and a minimal authoring workflow.
- Post listing and detail pages
- Tag and category
- SEO-friendly metadata
- Responsive layout
- Milkdown-based editor integration
- Cloudflare D1-based content storage and management
- Admin authentication and access control — See Authentication
Install dependencies:
pnpm installRun the dev server:
pnpm devBuild for production:
pnpm buildPreview the production build:
pnpm previewPrerequisites:
Install dependencies and Playwright browsers:
pnpm install
pnpm exec playwright install chromium --with-depsRun the full test suite (this project uses a small test runner wrapper that launches a single Playwright Chromium server and runs Vitest):
pnpm testThis blog uses Milkdown as the writting editor and stores post data in posts table from Cloudflare D1
- Write and edit content in Milkdown.
- Convert editor output to Markdown format.
- Upload and manage content files in Cloudflare D1.
- Read content from
poststable in the app and render post pages.
- Rich text authoring with Markdown workflow
- Centralized content storage on D1
- Easy post update and asset management
- Scalable content delivery for blog pages
This project targets Cloudflare Workers. Use the SvelteKit adapter configuration in svelte.config.ts and deploy with your preferred workflow.
This project uses Cloudflare D1 for data storage. Recent migrations include:
- migrations/0001_create_posts_table.sql
- migrations/0002_add_index_to_posts.sql
- migrations/0003_create_auth_tables.sql
Apply migrations using your D1 tooling or the Cloudflare D1 dashboard.
New users and sessions tables were added for auth. Store password hashes with a secure algorithm (bcrypt/argon2). Regularly remove expired sessions, e.g.:
DELETE FROM sessions WHERE expires_at < strftime('%s','now');Consider adding indexes on user_id and expires_at if session queries or cleanup run frequently.
The OpenAPI spec was updated to v0.2.0 and response schemas were refactored. See openapi.yml for details.
Distributed under the MIT license. See LICENSE for more information.