404 status when displaying `Document is empty` message?

34 Views Asked by At

I have a static and content/document driven nuxt 3 blog.

It has some placeholder markdown files under /content/ that just have their front-matter filled out. For example:

---
title: 'Example Title'
description: 'Example Desc'
navigation:
  title: 'Resources'
  bg: 'white'
---

When I go to to the above example, example.com/tester, it displays this error/msg but still returns a 200 status code.

Document is empty

Add content to it by opening content/4.tester/index.md file.

How can I get nuxt to return a 404 status code whenever this Document is empty error/msg shows up?

0

There are 0 best solutions below