How to add a post
- Create a file in
src/content/blog/, for examplemy-first-post.md(lowercase, dashes). - Start it with the front matter:
title,descriptionandpublishedAtare required;author,cover,coverAlt,tags,updatedAtanddraftare optional. - For a cover, put the image in
src/assets/blog/and point to it from the post (cover: ../../assets/blog/my-first-post.jpg): it is resized and converted for every screen when the site is built. Describe it incoverAlt, or leave that empty when the image is only decoration. - Write the post in Markdown below it.
- Publish. The post, the blog list, its tag pages, the RSS feed and the sitemap update together.
Set draft: true to keep a post out of the live site while you work on it.