Warning
This project is still under development and may contain bugs and breaking changes. Use with caution.
Live Demo (Netlify) | English | 简体中文 | 繁體中文
Astral Halo is a static blog template developed with Astro.
Note
This project is hosted in the following repositories:
- Codeberg (main repository): HPCesia/AstralHalo
- GitHub (mirror): HPCesia/astral-halo
The mirror repository is only used for collecting issues and does not accept PRs.
- Built with Astro and Tailwind CSS (using daisyUI)
- Freely switchable light/dark themes
- Responsive design
- Search functionality (currently only supports Pagefind)
- Responsive article table of contents
- Partially supports Obsidian features
- Callout
- Wiki links (only supports links to articles)
- Backlinks (only supports displaying backlinks for Wiki links)
- Comments system, supports:
- Various components that can be used in articles
- Smooth animations and page transitions
- Useful JS script tools
- PWA supports
-
Use this template to generate a new repository or fork this repository.
-
For local development, clone the repository, run
pnpm installto install dependencies, andpnpm devto start the development server.- If pnpm is not installed, first run
npm install -g pnpmto install it.
- If pnpm is not installed, first run
-
Customize your blog through the configuration file
src/config.ts. Configuration documentation can be found in the comments ofsrc/types/config.ts. -
Run
pnpm newto create a new draft. Then runpnpm pubto publish it to thesrc/content/postsdirectory when finished. -
Refer to the official guide to deploy your blog to Vercel, Netlify, GitHub Pages, etc. Before deployment, edit the site settings in astro.config.mjs.
---
title: Article Title
slug: post-entry # The article will be generated at the path [BASE_URL]/posts/post-entry/
published: 1970-01-01T00:00:00Z
description: Article Description
category: Lorem
tags: [Foo, Bar]
cover: /path/to/cover.jpg
lang: en # Only needed when article language differs from site language in `config.ts`
comment: true # Enable comments, requires comment system to be enabled and configured in `config.ts`
---All commands need to be run from the project root directory:
| Command | Action |
|---|---|
pnpm install |
Install dependencies |
pnpm dev |
Start dev server at localhost:4321 |
pnpm build |
Build static site to ./dist/ |
pnpm preview |
Preview built site locally |
pnpm new |
Create new article |
pnpm pub |
Publish draft |
pnpm lint |
Check code |
pnpm format |
Format code |
pnpm astro ... |
Run Astro CLI |