blog/README.md

57 lines
2.4 KiB
Markdown
Raw Normal View History

2023-10-18 02:04:08 +08:00
# Fuwari
2023-10-18 02:04:08 +08:00
> [!WARNING]
2023-10-18 17:53:14 +08:00
> This project is still very unfinished and the code is quite messy. Features may be changed or removed in the future.
2023-10-18 02:04:08 +08:00
Fuwari (not the final name maybe) is a static blog template built with [Astro](https://astro.build), a refactored version of [hexo-theme-vivia](https://github.com/saicaca/hexo-theme-vivia).
2023-10-18 02:04:08 +08:00
[**🖥Live Demo (Vercel)**](https://fuwari.vercel.app)
2023-11-25 16:32:10 +08:00
![Preview Image](https://raw.githubusercontent.com/saicaca/resource/main/fuwari/home.png)
2023-10-22 12:06:39 +08:00
## ✨ Features
- [x] **Built with [Astro](https://astro.build) and [Tailwind CSS](https://tailwindcss.com)**
- [x] **View Transitions between pages**
- [is not supported by Firefox and Safari yet](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API#browser_compatibility)
2023-10-22 12:06:39 +08:00
- [x] Light / dark mode
- [x] Customizable theme colors & banner
- [x] Responsive design
- [ ] Comments
- [ ] Search
- [ ] TOC
2023-10-18 17:53:14 +08:00
## 🚀 How to Use
2023-11-25 16:32:10 +08:00
1. [Generate a new repository](https://github.com/saicaca/fuwari/generate) from this template.
2. Edit the config file `src/config.ts` to customize your blog.
3. Run `pnpm run new-post -- <filename>` to create a new post and edit it in `src/content/posts/`.
2023-10-18 17:53:14 +08:00
4. Deploy your blog to Vercel, Netlify, GitHub Pages, etc. following [the guides](https://docs.astro.build/en/guides/deploy/).
## ⚙️ Frontmatter of Posts
```yaml
---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
2023-10-21 10:52:01 +08:00
image: /images/cover.jpg
tags: [Foo, Bar]
category: Front-end
2023-10-18 17:53:14 +08:00
---
```
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
2023-10-18 17:53:14 +08:00
| Command | Action |
|:---------------------------------|:-------------------------------------------------|
| `pnpm install` | Installs dependencies |
| `pnpm run dev` | Starts local dev server at `localhost:4321` |
| `pnpm run build` | Build your production site to `./dist/` |
| `pnpm run preview` | Preview your build locally, before deploying |
| `pnpm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `pnpm run astro -- --help` | Get help using the Astro CLI |
| `pnpm run new-post -- <filename>` | Create a new post |