N
Nuxt8mo ago
Spunkie

404 status when displaying `Document is empty` message?

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:
/content/4.tester/index.md
---
title: 'Example Title'
description: 'Example Desc'
navigation:
title: 'Resources'
bg: 'white'
---
/content/4.tester/index.md
---
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.
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 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server