A astro theme use Astro Theme Provider
- Create an empty Astro project(if has, skip):
pnpm create astro@latest my-website --template minimal -y
- Add the theme to your project:
pnpm add astro-charm
- Config in your
astro.config.ts
:
import { defineConfig } from "astro/config";
import astroCharm from "astro-charm";
export default defineConfig({
integrations: [
astroCharm({
config: {
title: "Your Blog",
description: "Your blog description",
side: {
title: "Title",
sub: "Sub Title",
bio: "Bio",
},
// for more config, see `https://github.com/Yuhanawa/astro-charm/blob/main/package/index.ts#L55-L117`
},
}),
],
});
Other way(WIP, not recommend)
edit your astro.config.ts
import { defineConfig } from "astro/config";
import astroCharm from "astro-charm";
export default defineConfig({
integrations: [astroCharm()],
});
and run
pnpm create astro-theme@latest init astro-charm
- Enjoy it!
- upgrade to Astro v5
- guide docs
- code copy button
- better code block
- youtube and bilibili video component
- search
- category and tag page
- init command
- live demo
- customize side
- dark mode
- comments
- sitemap
- analytics
- now can use custom script instead temporary
- support mobile
The source of inspiration is chanshiyu's blog.
When creating this theme, many other excellent projects were referenced.