LOADING
215 words
1 minute
Guide for Template - Getting Started
2001-10-02
No Tags

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: Chore
comment: true
draft: false
---
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.

src/content/posts/
├── post-1.md
└── post-2/
├── cover.jpg
└── index.md
Guide for Template - Getting Started
/posts/guide/getting-started/
Author
Lumen C
Published at
2001-10-02
License
CC BY-NC-SA 4.0

Some information may be outdated