Skip to content

Ficorcc/Thought

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThoughtLite

ThoughtLite Light Mode Preview ThoughtLite Dark Mode Preview

GitHub Release GitHub License Ask DeepWiki

A modern Astro theme, focused on content creation 🌟

English 简体中文

Note

  • main branch: Static build, can be deployed on any static hosting platform.
  • cloudflare branch✅: Enables built-in comment system, only deployable on Cloudflare.

🎬 Live Demo: Cloudflare Workers

✨ Features

  • 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.

📋 Prerequisites

Before you begin, make sure you have the following accounts:

⚡️ Quick Start

Using Astro Command

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

Using Template

  1. Use this template to create a new repository (enable Include all branches) or fork this repository (uncheck Copy the main branch only).
  2. 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

🔧 Configuration

Related theme configuration can be found in the following documents:

💻 Commands

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

🚀 Deployment

pnpm build
pnpm deploy

For automated deployment using GitHub Actions, refer to GitHub Actions Configuration Guide.

🔄 Updates

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:local

✍️ Content Creation

Content creation is centralized in the src/content directory, mainly including:

  • note - Focused on carefully crafted and detailed long-form works
  • jotting - Lightweight and immediate content recording
  • preface - Displayed on the homepage as the first impression
  • information - Containing various descriptive content

For details, refer to the Content Creation Guide.

🤝 Contributing

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

🙏 Acknowledgments

Tech Stack

Inspiration

📜 License

This project is licensed under GPLv3, allowing free modification and distribution, but the original copyright notice must be retained.

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages