Empty collections

An empty collection, or more specific, a page that uses pagination to list posts, will return an error 404 if there is no sub-content.

We assume your site structure looks like this one here:

├── _posts
|  ├── category1
|  |  ├── file1.md
|  |  ├── file2.md
|  ├── category2
|  |  ├── file1.a.md
|  |  ├── file2.a.md
|  |  ├── file3.a.md
|  ├── category3
|  ├── category4
|  |  ├── file1.b.md
|  |  ├── file2.b.md

And the page, that lists all posts from catagory3 looks like this one:

---
layout: archive
permalink: /category3/
category: category3
title: &title "Category3 Page Listing"
pagination: 
  enabled: true
  category: category3
---

With this setup the page /category3/ will not be build and a request to that URL will end up with an error 404.

Leave a Comment