mobile wallpaper 1
mobile wallpaper 2
mobile wallpaper 3
mobile wallpaper 4
323 words
1 minute
撰写博客文章
2024-04-01

本博客模板基于 Astro 构建。本文是一个简短的通用示例,展示一篇文章的文件结构与常用 frontmatter。完整的最新 schema 与 Markdown 语法,请参见内容创作指南。

通用 frontmatter#

目录#

---
title: "An Example Article"
published: 2026-08-01
updated: 2026-08-08
description: "A short summary for previews."
image: ./cover.webp
tags: [Example, Guide]
category: Guides
draft: false
comment: true
---
AttributeDescription
title文章的标题。
published文章发布的日期。
pinned是否将本文置顶在文章列表顶部。
priority置顶文章的优先级。数值越小优先级越高(0、1、2……)。
description文章的简短描述,显示在首页。
image文章的封面图路径。
1. 以 http:// 或 https:// 开头:使用网络图片
2. 以 / 开头:对应 public 目录下的图片
3. 以上前缀都没有:相对于当前 markdown 文件
tags文章的标签。
category文章的分类。
licenseName文章内容的许可证名称。
author文章的作者。
sourceLink文章内容的来源链接或参考。
draft若文章仍是草稿,则不会显示。

文章文件放在哪里#

将文章文件放在 src/content/posts/ 目录下。你可以创建子目录,以组织文章及其本地资源。

src/content/posts/
├── example.md
└── guides/
├── cover.webp
└── index.md

像 ./cover.webp 这样的相对图片路径,会从当前文章文件所在位置开始解析。

Share

If this article helped you, please share it with others!

撰写博客文章
https://mizuki.mysqil.com/posts/guide/
Author
我很莜陌
Published at
2024-04-01
License
MIT License

Some information may be outdated

Table of Contents