Skip to content

How to Fix MkDocs Blog Plugin Issues

DodaTech Updated 2026-06-24 2 min read

In this tutorial, you'll learn about How to Fix MkDocs Blog Plugin Issues. We cover key concepts, practical examples, and best practices.

The MkDocs blog plugin shows no posts, pagination returns 404, or the build fails with "Blog plugin configuration invalid." MkDocs Material's blog feature requires correct setup.

The Wrong Way

# mkdocs.yml
plugins:
  - blog

Without configuring the blog directory or post structure, the plugin creates a default blog at `/blog/` but may not find any posts.

## The Right Way

### Step 1: Install the blog plugin

```bash
# For MkDocs Material, the blog plugin is included
# No separate install needed for Material 9+
pip install mkdocs-material

### Step 2: Configure the blog in mkdocs.yml

```yaml
plugins:
  - blog:
      blog_dir: blog
      post_dir: "{blog_dir}/posts"
      pagination: true
      pagination_per_page: 10

nav:
  - Blog: blog/index.md

### Step 3: Create blog post files with correct structure

```markdown
---
title: "Getting Started with Our API"
date: 2026-06-24
authors:
  - doda
categories:
  - tutorials
---

Blog content goes here...

Post files go in docs/blog/posts/.

Step 4: Define authors and categories

# mkdocs.yml
extra:
  blog:
    authors:
      doda:
        name: DodaTech
        description: Built by the developers of Doda Browser, DodaZIP, and Durga Antivirus Pro.
        avatar: https://avatars.githubusercontent.com/u/example
Blog renders: 3 posts, pagination working, author cards displayed, category filter functional.

Prevention

  • Maintain a consistent posting schedule with frontmatter dates in the past.
  • Test pagination by creating more than 10 posts.
  • The blog-as-content pattern mirrors Doda Browser's release notes — structured frontmatter drives the render.

Common Mistakes with blog plugin

  1. Using foldl instead of foldl' causing stack overflow on large lists
  2. Forgetting deriving (Show, Eq) on custom data types needed for debugging
  3. Placing the wildcard pattern first in case expressions, making all subsequent patterns unreachable

These mistakes appear frequently in real-world MKDOCS code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.

Practice Exercise

Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.

This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.

FAQ

### Why are my MkDocs blog posts not showing on the blog page?

Check that: (1) post files are in the correct post_dir (default: docs/blog/posts/), (2) each post has a date in the past, and (3) the blog plugin is listed in the plugins section. Posts without a future date are hidden.

Can I have multiple blog sections in MkDocs?

Not with the built-in blog plugin. You can only have one blog per site. Workaround: use separate MkDocs sites for different blogs, or use page-level categories to simulate multiple sections.

How does MkDocs blog pagination work?

The blog plugin page splits posts into pages of pagination_per_page (default: 10). Navigation links (Previous / Next) appear at the bottom of the blog page. Individual posts do not have pagination.

Built by the developers of DodaTech

Doda Browser, DodaZIP & Durga Antivirus Pro