Skip to content

Repository files navigation

Astro Theme Pure

English | 简体中文

A simple, fast and powerful blog & document theme built by Astro.

GitHub deployments NPM Version GitHub Release GitHub License

image image

Note

Known issues: Header & customize options is still under development (template exposed still).

Introduction

Checkout Demo Site →

🔥 Features

  • 🚀 Fast & high performance
  • ⭐ Simple & clean design
  • 📱 Responsive design
  • 🔍 Full-site search built with pagefind
  • 🗺️ Sitemap & RSS feed
  • 🕸️ SEO-friendly
  • 📖 TOC (table of contents)
  • 🖼️ Dynamic open graph generation for posts
  • 🖼️ Mediumzoom lightbox for images

📦 Components

Theme includes a lot of components, which can not only be used in the theme, but also in other astro projects.

For other astro projects, UnoCSS is required. See Package README for more details.

  • Basic components: Aside, Tabs, Timeline, Steps, Spoiler...
  • Advanced components: GithubCard, LinkPreview, Quote, QRCode...

✅ Lighthouse score

lighthouse-score

Documentation

Docs | Showcase

Package

See astro-theme-pure on npm.

Local development

Environment requirements

Warning

Astro 6.0+ requires Node.js 22.12.0 or newer. Odd-numbered Node.js versions such as 23 are not supported by Astro.

You can choose one of the following methods for project development:

For deployment methods using container like Docker & Docker Compose, please refer the documention Using Docker Compose.

Getting started

  1. Clone the repository and enter the directory:

    git clone https://github.com/cworld1/astro-theme-pure.git
    cd astro-theme-pure

    Edit src/site.config.ts to customize the site.

  2. Install dependencies:

    bun install
  3. Start the development server:

    bun dev
    # or
    pnpm dev
    # or
    yarn run dev
    # or
    npm run dev

    The development server runs at http://localhost:4321 by default.

Creating a new blog article

After setting up either development environment, you can create a new blog article:

bun pure new

Deployment

Manual deployment

Build the production site into the ./dist directory:

bun run build

Once the build is complete, the generated static files will be located in the ./dist directory. You can deploy this directory to any platform that supports static site hosting.

Preview the production build locally:

bun preview

Static hosting platforms

You can deploy your blog to any static site hosting platform.

  • Refer to the official Astro Deployment Guide for specific deployment methods.
  • Depending on the deployment platform you choose, you may need to modify the astro.config.ts configuration file in the project.
Vercel Netlify
Deploy with Vercel Deploy to Netlify

Contributions

To spend more time coding and less time fiddling with whitespace, this project uses code conventions and styles to encourage consistency. Code with a consistent style is easier (and less error-prone!) to review, maintain, and understand.

Thanks

Other third party references are on Docs#Contributions. Appreciate for all open source libraries.

License

This project is licensed under the Apache 2.0 License.

Star History Chart

About

⭐ A simple, fast and powerful blog & document theme built by Astro

Topics

Resources

Code of conduct

Stars

1.0k stars

Watchers

6 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages