Skip to content

panjinye/panjinye.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 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

  1. Create Cloudflare D1, refer to Cloudflare D1 Configuration Guide.
  2. Configure Cloudflare Turnstile, refer to Cloudflare Turnstile Configuration Guide.
    • You can skip this step if you don't enable anonymous comments.
  3. Configure OAuth authentication, refer to OAuth Configuration Guide.
  4. Customize site configuration and internationalization (i18n) by modifying the following files, refer to Site Configuration Guide and Internationalization Configuration Guide:
    • .env
    • astro.config.ts
    • site.config.ts

๐Ÿ’ป 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

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors