Useful tools and resources to create IA services.

Learn More!

~ 7 min read

Adding new posts in Monster theme

Some rules & recommendations for creating or adding new posts using Monster theme.

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

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.

PropertyDescriptionValue
titleTitle of the post. (h1)required*
descriptionDescription of the post.required*
excerptDescription of the post. Used in post excerpt and site description of the post.default = post.description
publishDatePublished datetime in MM DD YYYY format.
slugSlug for the post. Usually the all lowercase title seperated in - instead of whtiespacedefault = slugified title
authorsAuthors of the post.
tagsRelated keywords for this post. Written in array yaml format.
draftMark this post ‘unpublished’.default = false
imageimage of the post. Useful for social media sharing and SEO.

title and description fields in frontmatter must be specified.

Title is the title of the post and it is very important for search engine optimization (SEO).

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. If slug is not specified, the slugified title of the post will be used as slug.

Here is the sample frontmatter for the post.

# src/contents/sample-post.md
---
publishDate: "Aug 02 2022"
title: "Markdown elements demo post"
description: "About Markdown elements and how you can use it effectively"
excerpt: "Markdown is a lightweight markup language that allows for the creation and editing of text documents in an easy-to-read and easy-to-write format. It is used to quickly format text on the web and help make it easier to read and comprehend. The elements of Markdown includes headings, paragraphs, bold and italic text, lists, images, and links."
image: "https://ik.imagekit.io/waveupdev/pstls-assets/images/blog/blog-photo5.png?ik-sdk-version=javascript-1.4.3&updatedAt=1669757259566"
tags: [markdown, blog, Astro]
---

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

Headings

There’s one thing to note about headings. The Monster blog posts use title (title in the frontmatter) as the main heading of the post. Therefore, the rest of the heading in the post should be using h2 ~ h6.

This rule is not mandatory, but highly recommended for visual, accessibility and SEO purposes.

Bonus

Image

When you put images in the blog post, it is recommended to use an extrnal cdn service. This will affect the overall performance of the website.

My recommendation for cdn sites.

The default image will be placed if a post does not specify the OG image. Though not required, image related to the post should be specify in the frontmatter. The recommended size for image is 1200 X 640 px.

Share: