Adding new posts in AstroPaper theme

Here are some rules/recommendations, tips & ticks for creating new posts in AstroPaper blog theme.

Table of contents

Frontmatter

Frontmatter is the main place to store some important information about the post (article). Frontmatter lies at the top of the article and is written in YAML format. Read more about frontmatter and its usage in astro documentation.

Here is the list of frontmatter property for each post.

PropertyDescriptionRemark
titleTitle of the post. (h1)required*
descriptionDescription of the post. Used in post excerpt and site description of the post.required*
pubDatetimePublished datetime in ISO 8601 format.required*
authorAuthor of the post.default = SITE.author
postSlugSlug for the post. Will automatically be slugified.default = slugified title
featuredWhether or not display this post in featured section of home pagedefault = false
draftMark this post ‘unpublished’.default = false
tagsRelated keywords for this post. Written in array yaml format.default = others
ogImageOG image of the post. Useful for social media sharing and SEO.default = SITE.ogImage or generated SVG image

Only title, description and pubDatetime fields in frontmatter must be specified.

Title and description (excerpt) are important for search engine optimization (SEO) and thus AstroPaper encourages to include these in blog posts.

slug is the unique identifier of the url. Thus, slug must be unique and different from other posts. The whitespace of slug needs to be separated with - or _ but - is recommended. However, even if you don’t write the correct slug, AstroPaper will automatically slugify your incorrect slug. If slug is not specified, the slugified title of the post will be used as slug.