Update Blog Article — Astro Template Guide

Learn how to write and publish blog articles on the Blacks Astro JS template. Create new Markdown files with frontmatter for tags and categories.

#astro #blog #article #template #guide

Update Blog Article — Astro Template Guide

documentation

Publih On: 2023-12-02

Learn how to write and publish blog articles on the Blacks Astro JS template.

Full documentation: Blog guide →


Where Blog Posts Live

All blog posts are in the folder:

src/pages/blog

This area is for writing blog post articles.

Important: Do not delete or change the [..page].astro file. This file handles pagination and is required for the blog to work.


Create a New Blog Post

To create a new article:

  1. Create a new .md file inside src/pages/blog/
  2. Name it with your article slug — for example: hello-world.md
  3. Open it in your code editor
  4. Add the frontmatter (see below)
  5. Write your content in Markdown
  6. Save the file

The filename becomes the URL. For example:


Frontmatter Format

---
layout: ../../design/blog/blogpost.astro
title: "Write your title in here"
description: "Insert description here"
image: insert your image url
pubDate: 2023-12-04
tags: ["insert tag here", "tag1", "tag2"]
categories: ["insert categories in here"]
---

Write your content with markdown lang here...

What Each Field Does

Field Purpose
layout Blog post layout template. Don’t change this.
title Article title — appears on the post page and in listings
description Short summary — used for SEO and social previews
image Cover image for the article
pubDate Publication date — format: YYYY-MM-DD
tags Array of tags. Creates tag archive pages automatically.
categories Array of categories. Creates category archive pages automatically.

Tips for Writing Blog Posts

  1. Filename = URL. Keep filenames short, lowercase, and hyphenated.
  2. Use real dates. The pubDate field determines the post order — newest first.
  3. Write a strong description. It’s what Google shows in search results.
  4. Use consistent tags. If you use portfolio in one post, don’t use portfolios in another.
  5. Keep image sizes consistent. Around 1200×600 works well for cover images.

Quick Method

For a simpler workflow:

  1. Copy an existing post from src/pages/blog/
  2. Rename it to match your new article
  3. Update the frontmatter and content
  4. Save

No configuration required. The blog index updates automatically.


Need Help?

If you need custom work or a headless CMS integrated, our team can help.

Headless CMS Integration →

Blacks — Multipurpose Astro Themes for Creators facebook FacebookBlacks — Multipurpose Astro Themes for Creators twitter TweetBlacks — Multipurpose Astro Themes for Creators pinterest PinterestBlacks — Multipurpose Astro Themes for Creators linked Linkedin
Blacks — Multipurpose Astro Themes for Creators

Blacks — Multipurpose Astro Themes for Creators

One Astro template for portfolio, company profile, blog, and creative work. Image gallery, cinematic video, blog system, and full SEO. Built for creators.


123 Creative Street
Los Angeles, CA 90001
United States
+1 234 567 890
hello@yourdomain.com