---
title: "Managing Blog Posts"
description: "A complete, beginner-friendly guide to creating, reading, updating, and deleting blog posts in Nuxas. Learn every frontmatter field, how to write the body in Markdown, and how to manage posts through Decap CMS or by editing files directly."
canonical_url: "https://nuxas.pages.dev/docs/12-blog-crud"
---

> Index of every page on this site: [llms.txt](https://nuxas.pages.dev/llms.txt)

## Managing Blog Posts

In the previous chapter, we customized the 404 error page. Now we will manage **blog posts** — creating new posts, reading existing ones, updating them, and deleting the ones you no longer need.

Blog posts are the most flexible content type in Nuxas. They support rich text, code blocks, images, and internal links. Each post is a single Markdown file, and every field is defined in the frontmatter at the top of that file.

This chapter covers the entire lifecycle of a blog post. We will go slowly, with examples at every step.

### Where Blog Posts Live

All blog posts live in `content/blog/`. Each post is a separate Markdown file. The filename becomes the URL slug for the post. For example:

- `content/blog/nuxt-seo-checklist-2026.md` becomes `/blog/nuxt-seo-checklist-2026`
- `content/blog/from-template-to-product-nuxas-journey.md` becomes `/blog/from-template-to-product-nuxas-journey`

Filenames should be lowercase, with hyphens instead of spaces. Avoid special characters. The filename is what appears in the URL, so keep it short and descriptive.

### Understanding the Frontmatter

Every blog post starts with a block of YAML between two `---` lines. This block is called the **frontmatter**. It defines the metadata of the post: the title, the description, the date, the author, and so on.

Here is a complete example of a blog post frontmatter:

```yaml
---
title: "The Nuxt 4 SEO Checklist for 2026: Ship Pages Google Actually Ranks"
description: A practical, code-level SEO checklist for Nuxt 4 in 2026 covering SSR, meta management, structured data, sitemaps, Core Web Vitals, and the mistakes that quietly kill rankings.
date: 2026-10-18
category: SEO
author: Creativitas
authorInitials: CR
readTime: 9 min read
tags:
  - Nuxt 4
  - SEO
  - Core Web Vitals
  - Structured Data
badge: SEO Engineering
cover: https://images.unsplash.com/photo-1432888622747-4eb9a8efeb07?auto=format&fit=crop&w=1600&q=80
ctaProduct: nuxas-code
---
```

Let us go through each field.

#### title

The title of the post. It appears as the `<h1>` on the post page, in the browser tab, and in search engine results.

**Tip:** Keep it under 60 characters for best SEO. If it is longer, search engines may truncate it.

#### description

A one-sentence summary of the post. It appears in search engine results, social media previews, and blog listing cards.

**Tip:** Keep it between 120 and 160 characters. This is the optimal length for search engine snippets.

#### date

The publication date in `YYYY-MM-DD` format. This field is used to sort posts on the blog listing page. The newest posts appear first.

**Tip:** You can schedule a post for the future by setting a future date. However, Nuxt will still publish it immediately when you deploy. To truly schedule a post, you need a different approach (covered in a later chapter, if at all).

#### category

A short label for the post's category. It appears as a badge on the blog listing card. Examples: `SEO`, `Performance`, `Architecture`, `Case Study`, `Strategy`.

**Tip:** Use consistent categories across your posts. This makes the blog list easier to browse.

#### author

The full name of the author. It appears on the post page, next to the author avatar.

#### authorInitials

Two letters representing the author. These appear in the circular avatar on the post page.

**Tip:** Use the author's first and last initials. For example, "Alex Vance" becomes "AV".

#### readTime

The estimated reading time, as a string. For example, `9 min read` or `5 min read`.

**Tip:** Estimate 200 words per minute. A 1,800-word post is roughly 9 minutes.

#### tags

A list of tags for the post. Tags appear at the bottom of the post, and they link to a tag archive page. For example, the tag `Nuxt 4` links to `/blog/tag/nuxt-4`.

**Tip:** Use 3 to 5 tags per post. Too few and the post is hard to discover. Too many and the tags lose meaning.

#### badge

An optional short label that appears at the top of the post, above the title. Use it to highlight the post's category or special status. Examples: `SEO Engineering`, `Framework Comparison`, `Case Study`.

**Tip:** If you do not want a badge, omit this field or set it to an empty string.

#### cover

The URL of the cover image. It appears on the blog listing card and at the top of the post page.

**Tip:** Use a 16:9 aspect ratio image at least 1600 pixels wide. Unsplash is a good source for free images.

#### ctaProduct

An optional field that connects the post to a product. If set, the post page shows a call-to-action band at the bottom, promoting that product. The value is the product's slug (the filename without the `.md` extension).

For example, `ctaProduct: nuxas-code` links the post to the `nuxas-code` product. The call-to-action band shows the product's title, excerpt, and purchase button.

**Tip:** Use this field to monetize your blog. Each post can promote a different product, or you can use the same product across all posts.

### Writing the Body

Below the frontmatter, the body of the post is written in **Markdown**. Markdown is a lightweight markup language that is easy to read and write. Here are the most common Markdown elements:

#### Headings

Use `##` for section headings and `###` for subheadings.

```markdown
## This is a section heading

### This is a subheading
```

#### Paragraphs

Separate paragraphs with a blank line.

```markdown
This is the first paragraph.

This is the second paragraph.
```

#### Bold and Italic

Use `**text**` for bold and `*text*` for italic.

```markdown
This is **bold** and this is *italic*.
```

#### Lists

Use `-` for unordered lists and `1.` for ordered lists.

```markdown
- First item
- Second item
- Third item

1. First step
2. Second step
3. Third step
```

#### Links

Use `[text](url)` for links.

```markdown
[Click here](https://example.com) to visit the site.
```

#### Code Blocks

Use triple backticks for code blocks. You can specify the language for syntax highlighting.

```markdown
```ts
const greeting = 'Hello, world!'
console.log(greeting)
```
```

#### Images

Use `![alt text](url)` for images.

```markdown
![A beautiful sunset](https://example.com/sunset.jpg)
```

#### Blockquotes

Use `>` for blockquotes.

```markdown
> This is a quote from someone important.
```

### Creating a New Blog Post

#### If You Purchased the Code + Decap CMS Edition

1. Open `http://localhost:3000/admin`.
2. In the left sidebar, click **Blog Posts**.
3. Click **New Blog Post** in the top right corner.
4. Fill in the fields:

  - **Title** — the post title.
  - **Description** — the post summary.
  - **Date** — the publication date.
  - **Category** — the post category.
  - **Author** — the author's name.
  - **Author Initials** — two letters for the avatar.
  - **Read Time** — the estimated reading time.
  - **Tags** — a list of tags.
  - **Badge** — an optional badge.
  - **Cover Image** — upload an image or paste a URL.
  - **CTA Product** — an optional product slug.
  - **Body** — the post content in Markdown.
5. Click **Save** in the top right corner.

The CMS will create a new file in `content/blog/` with a slug derived from the title. For example, a post titled "My First Post" becomes `my-first-post.md`.

#### If You Purchased the Code Only Edition

1. Open the `content/blog/` folder in VS Code.
2. Right-click the folder and choose **New File**.
3. Name the file with a slug, e.g., `my-first-post.md`.
4. Paste the frontmatter template at the top of the file.
5. Fill in the fields.
6. Write the body in Markdown below the frontmatter.
7. Save with **Ctrl + S**.

### Reading a Blog Post

To read a blog post on your local site, navigate to `/blog` and click on a post. Or go directly to the post URL:

```text
http://localhost:3000/blog/my-first-post
```

The post page shows:

- The cover image at the top.
- The badge, title, and author strip.
- The post body in Markdown.
- The tags at the bottom.
- Previous and next post navigation.
- A call-to-action band (if the post has a `ctaProduct`).

### Updating a Blog Post

#### If You Purchased the Code + Decap CMS Edition

1. Open `http://localhost:3000/admin`.
2. In the left sidebar, click **Blog Posts**.
3. Click the post you want to edit.
4. Change any field or the body.
5. Click **Save**.

#### If You Purchased the Code Only Edition

1. Open the post file in `content/blog/`.
2. Edit any field or the body.
3. Save with **Ctrl + S**.

### Deleting a Blog Post

#### If You Purchased the Code + Decap CMS Edition

1. Open `http://localhost:3000/admin`.
2. In the left sidebar, click **Blog Posts**.
3. Click the post you want to delete.
4. Click the three dots in the top right corner, then choose **Delete**.
5. Confirm the deletion.

#### If You Purchased the Code Only Edition

1. Open the `content/blog/` folder in VS Code.
2. Right-click the post file and choose **Delete**.
3. Confirm the deletion.

### A Complete Example

Here is a complete blog post, ready to copy and adapt:

```markdown
---
title: "How to Launch a SaaS in 7 Days with Nuxt 4"
description: A step-by-step guide to launching a production-ready SaaS product in one week using Nuxt 4 and Nuxas.
date: 2026-11-01
category: Strategy
author: Your Name
authorInitials: YN
readTime: 6 min read
tags:
  - Nuxt 4
  - SaaS
  - Launch
badge: Launch Strategy
cover: https://images.unsplash.com/photo-1555066931-4365d14bab8c?auto=format&fit=crop&w=1600&q=80
ctaProduct: nuxas-code
---

Launching a SaaS product used to take months. With Nuxt 4 and a production-grade template, it can take a week. Here is how.

## Day 1 — Set Up Your Project

Start by cloning Nuxas and running `npm install`. Configure your site URL, your brand name, and your content. Do not worry about perfection — you will refine later.

## Day 2 — Configure Your Product

Define your product's pricing tiers, features, and call-to-action. Use the Global Site Config to set up your homepage hero, features, and testimonials.

## Day 3 — Write Your First Blog Post

Blog posts are the fastest way to attract organic traffic. Write one long, useful post about a problem your product solves.

## Day 4 — Connect Your Payment Platform

Nuxas supports Stripe and Gumroad out of the box. Connect your account and test a checkout.

## Day 5 — Deploy to Production

Deploy to Netlify, Vercel, or Cloudflare Pages. Configure your custom domain. Test the site on a real URL.

## Day 6 — Launch on Social Media

Share your launch on Twitter, LinkedIn, and Indie Hackers. Link to your homepage and your first blog post.

## Day 7 — Iterate

Launch is not the end. It is the beginning. Collect feedback, fix issues, and improve your product every day.

**[Get Nuxas Code Only →](/products/nuxas-code)**
```

This example has every required field, a complete body with headings, paragraphs, and internal links, and a call-to-action at the end. Copy it, change the values, and you have a new blog post.

### What to Expect in the Next Chapter

In the next chapter, we will manage **products** — the catalog of items you sell. We will cover every product field, including the gallery, specs, and purchase URL. This is a longer chapter because products have more fields than blog posts.

See you in the next chapter.

## Sitemap

See the full [sitemap](https://nuxas.pages.dev/sitemap.md) for all pages.
