Note
mainbranch: Static build, can be deployed on any static hosting platform.cloudflarebranchโ : Enables built-in comment system, only deployable on Cloudflare.
๐ฌ Live Demo: Cloudflare Workers
- Responsive Design - Adaptive for mobile, tablet, and desktop.
- Light / Dark Mode - Auto-follows system preference with manual toggle support.
- CSR Dynamic Content Filtering - List filtering and pagination via History API.
- i18n Support - Extensible multilingual support, also works perfectly in monolingual mode.
- Sitemap & Feed Subscription - Automated generation of Sitemap and Atom Feed.
- OpenGraph Support - Built-in Open Graph meta tags for optimized social media sharing.
- Comment System - Based on Cloudflare D1, easy deployment with privacy control; supports OAuth authentication and guest comments.
- Desktop Notifications - Real-time notifications using Web Push API.
- Email Notifications - Send email notifications using Restful API.
Before you begin, make sure you have the following accounts:
- Cloudflare Account - For deployment and database hosting
- GitHub Account - For code hosting and automated deployment
Run the following command:
# `cloudflare` at the end is the branch name, do not omit it!
pnpm create astro --template tuyuritio/astro-theme-thought-lite#cloudflare
# Follow the interactive prompts to create the project
cd <your-project-name>
pnpm db:migrate:local # Generate local test database
pnpm dev- Use this template to create a new repository (enable
Include all branches) or fork this repository (uncheckCopy the main branch only). - Run the following commands:
git clone <your-repo-url>
cd <your-repo-name>
pnpm install
pnpm db:migrate:local # Generate local test database
pnpm dev- Create Cloudflare D1, refer to Cloudflare D1 Configuration Guide.
- Configure Cloudflare Turnstile, refer to Cloudflare Turnstile Configuration Guide.
- You can skip this step if you don't enable anonymous comments.
- Configure OAuth authentication, refer to OAuth Configuration Guide.
- Customize site configuration and internationalization (i18n) by modifying the following files, refer to Site Configuration Guide and Internationalization Configuration Guide:
.envastro.config.tssite.config.ts
The theme provides the following commonly used commands:
| Command | Action |
|---|---|
pnpm install |
Install project dependencies |
pnpm update |
Update project dependencies |
pnpm new |
Create a new content file |
pnpm dev |
Start the local development server (default: http://localhost:4321) |
pnpm check |
Run Astro type checking |
pnpm build |
Build the production version |
pnpm preview |
Preview the built site |
pnpm format |
Format code |
pnpm lint |
Lint code |
pnpm deploy |
Deploy to Cloudflare |
pnpm deploy:dry |
Simulate deployment |
pnpm db:migration |
Generate database migration files |
pnpm db:migrate:local |
Apply database migrations locally |
pnpm db:migrate:remote |
Apply database migrations remotely |
pnpm build
pnpm deployFor automated deployment using GitHub Actions, refer to GitHub Actions Configuration Guide.
Run the following commands to sync upstream updates:
git remote add theme https://github.com/tuyuritio/astro-theme-thought-lite.git
git fetch theme
git merge theme/cloudflare # Add `--allow-unrelated-histories` flag for first update
pnpm install
pnpm db:migrate:localContent creation is centralized in the src/content directory, mainly including:
note- Focused on carefully crafted and detailed long-form worksjotting- Lightweight and immediate content recordingpreface- Displayed on the homepage as the first impressioninformation- Containing various descriptive content
For details, refer to the Content Creation Guide.
All kinds of contributions are welcome and appreciated!
- Help promote the project or assist other users
- Report issues or suggest new features
- Improve documentation or help with internationalization (i18n)
- Submit code contributions
- See Contribution Guide for more information
- Core Framework - Astro
- Core Language - TypeScript
- UI Components - Svelte
- CSS Engine - Tailwind CSS
- Icons - Iconify
- Fonts - Google Fonts | ZeoSeven Fonts
- Image Viewer - Medium Zoom
- SPA Transitions - Swup
- OAuth - Arctic
- Code Quality - Biome
- ORM - Drizzle ORM
- Database - Cloudflare D1
- Edge Deployment - Cloudflare Workers
This project is licensed under GPLv3, allowing free modification and distribution, but the original copyright notice must be retained.

