OpenAI | GPT-Image 2.0
325 字
2 分钟
暮光指南:入门
Guide for Template - Getting Started
提示:本指南未提及的内容,您可以在 Astro 文档 中找到答案。
文章前置元数据
1---2title: 我的第一篇博客文章3published: 2020-02-024description: 这是我的新 Astro 博客的第一篇文章。5cover: ./cover.jpg6coverInContent: false7tags: []8category: 指南9comment: true10draft: false11translation:12 type: "human"13 reviewed: true14---| 属性 | 描述 |
|---|---|
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/ 目录中。您也可以创建子目录来更好地组织文章和资源文件。
1src/content/posts/2├── post-1.md3└── post-2/4 ├── cover.jpg5 └── index.mdTip: For the things that are not mentioned in this guide, you may find the answers in the Astro Docs.
Front-matter of Posts
1---2title: My First Blog Post3published: 2020-02-024description: This is the first post of my new Astro blog.5cover: ./cover.jpg6coverInContent: false7tags: []8category: Guides9comment: true10draft: false11translation:12 type: "human"13 reviewed: true14---| Attribute | Description |
|---|---|
title | The title of the post. |
published | The date the post was published. |
pinned | Whether this post is pinned to the top of the post list. |
description | A short description of the post. Displayed on index page. |
cover | The 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 |
coverInContent | Whether to show the cover image in the post content. |
tags | The tags of the post. |
category | The category of the post 1. Single category: category: Guides 2. Multi-category: category: [Guides, Getting Started] |
licenseName | The license name for the post content. |
author | The author of the post. |
sourceLink | The source link or reference for the post content. |
comment | Whether to enable comment for this post. Default is true. |
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.
1src/content/posts/2├── post-1.md3└── post-2/4 ├── cover.jpg5 └── index.md此页面可能不是最新版本。