LOADING
325 字
2 分钟

暮光指南:入门

Guide for Template - Getting Started

翻译提示 (未审阅)

此页面由 AI 翻译生成,可能存在不准确之处。

翻译自: 🇬🇧 English (Deepseek)

查看原文 回到译文

提示:本指南未提及的内容,您可以在 Astro 文档 中找到答案。

文章前置元数据

---
title: 我的第一篇博客文章
published: 2020-02-02
description: 这是我的新 Astro 博客的第一篇文章。
cover: ./cover.jpg
coverInContent: false
tags: []
category: 指南
comment: true
draft: false
translation:
type: "human"
reviewed: true
---
属性描述
title文章的标题。
published文章的发布日期。
pinned是否将文章置顶到文章列表顶部。
description文章的简短描述。显示在首页。
cover文章的封面图片路径。
1. 以 http://https:// 开头:网络图片
2. 以 / 开头:位于 public 目录中的图片
3. 无以上前缀:相对于 markdown 文件的路径
coverInContent是否在文章内容中显示封面图片。
tags文章的标签。
category文章的类别。
1. 单一类别:category: 指南
2. 多类别:category: [指南, 入门]
licenseName文章内容的许可证名称。
author文章的作者。
sourceLink文章内容的来源链接或参考。
comment是否启用文章评论。默认为 true
draft如果文章仍为草稿,则不会显示。

文章文件存放位置

您的文章文件应放置在 src/content/posts/ 目录中。您也可以创建子目录来更好地组织文章和资源文件。

src/content/posts/
├── post-1.md
└── post-2/
├── cover.jpg
└── index.md

Tip: 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: 2020-02-02
description: This is the first post of my new Astro blog.
cover: ./cover.jpg
coverInContent: false
tags: []
category: Guides
comment: true
draft: false
translation:
type: "human"
reviewed: true
---
AttributeDescription
titleThe title of the post.
publishedThe date the post was published.
pinnedWhether this post is pinned to the top of the post list.
descriptionA short description of the post. Displayed on index page.
coverThe cover image path of the post.
1. Start with http:// or https://: For web image
2. Start with /: For image in public dir
3. With none of the prefixes: Relative to the markdown file
coverInContentWhether to show the cover image in the post content.
tagsThe tags of the post.
categoryThe category of the post
1. Single category: category: Guides
2. Multi-category: category: [Guides, Getting Started]
licenseNameThe license name for the post content.
authorThe author of the post.
sourceLinkThe source link or reference for the post content.
commentWhether to enable comment for this post. Default is true.
draftIf 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.jpg
└── index.md
暮光指南:入门
/zh-CN/posts/twilight-guide-getting-started/
作者
MuxBuffer
发布于
2001-10-02
许可协议
CC BY-NC-SA 4.0
AI参与指数 IIIA-0
分类 未经AI制作
等级 0
简介 完全未使用AI

此页面可能不是最新版本。