Skip to content

feat: Better error page

Lukas 'ai-pi' Eipert requested to merge leipert-better-error-page into main

feat: Better error page

This adds a simple error page which renders a more meaningful message. This is mostly useful for development mode.

fix: Routing to /get-started/contribute

Currently we do a regex replace to remove /code and /contribute at the end of routes relating to e.g. component pages, as these do not correspond to real files. So we need to load:

  • /components/button => /contents/components/button.md
  • /components/button/code => /contents/components/button.md
  • /components/button/contribute => /contents/components/button.md

Unfortunately the current approach messes with /get-started/contribute as well and instead of contents/get-started/contribute.md it actually loads all files in contents/get-started/.

Luckily the first part and the second part of the routes are named "section" and "slug" respectively and we can simply construct the correct path to provide to @nuxt/content

Edited by Lukas 'ai-pi' Eipert

Merge request reports