498 字
2 分钟
Simple Guides for Fuwari
Cover image source: Source
This blog template is built with Astro. For the things that are not mentioned in this guide, you may find the answers in the Astro Docs.
Front-matter of Posts
---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
---
Attribute | Description |
---|---|
title | The title of the post. |
published | The date the post was published. |
description | A short description of the post. Displayed on index page. |
image | The cover image path of the post. 1. Start with http:// or https:// : Use web image2. Start with / : For image in public dir3. With none of the prefixes: Relative to the markdown file |
tags | The tags of the post. |
category | The category of the post. |
draft | If this post is still a draft, which won’t be displayed. |
Where to Place the Post Files
Your post files should be placed in src/content/posts/
directory. You can also create sub-directories to better organize your posts and assets.
src/content/posts/
├── post-1.md
└── post-2/
├── cover.png
└── index.md
🍥Fuwari
基于 Astro 开发的静态博客模板。
README 版本:
2024-09-10
✨ 功能特性
- 基于 Astro 和 Tailwind CSS 开发
- 流畅的动画和页面过渡
- 亮色 / 暗色模式
- 自定义主题色和横幅图片
- 响应式设计
- 评论
- 搜索
- 文内目录
🚀 使用方法
⚙️ 文章 Frontmatter
---
title: My First Blog Post
published: 2023-09-09
description: This is the first post of my new Astro blog.
image: ./cover.jpg
tags: [Foo, Bar]
category: Front-end
draft: false
lang: jp # 仅当文章语言与 `config.ts` 中的网站语言不同时需要设置
---
🧞 指令
下列指令均需要在项目根目录执行:
Command | Action |
---|---|
pnpm install 并 pnpm add sharp | 安装依赖 |
pnpm dev | 在 localhost:4321 启动本地开发服务器 |
pnpm build | 构建网站至 ./dist/ |
pnpm preview | 本地预览已构建的网站 |
pnpm new-post <filename> | 创建新文章 |
pnpm astro ... | 执行 astro add , astro check 等指令 |
pnpm astro --help | 显示 Astro CLI 帮助 |