OpenAI | GPT-Image 2.0
310 字
2 分钟
暮光指南:入門
Guide for Template - Getting Started
提示:本指南未提及的內容,您可以在 Astro 文件 中找到解答。
文章的 Front-matter
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---| 屬性 | 說明 |
|---|---|
title | 文章標題。 |
published | 文章發布日期。 |
pinned | 是否將此文章置頂於文章列表頂端。 |
description | 文章的簡短描述。顯示於首頁。 |
cover | 文章的封面圖片路徑。 1. 以 http:// 或 https:// 開頭:網路圖片2. 以 / 開頭:位於 public 目錄的圖片3. 無上述前綴:相對於 markdown 檔案的路徑 |
coverInContent | 是否在文章內容中顯示封面圖片。 |
tags | 文章的標籤。 |
category | 文章的分類。 1. 單一分類: category: Guides2. 多層分類: category: [Guides, Getting Started] |
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此页面可能不是最新版本。