Static GitHub Issues

[925] Trying to use Nuxt on top of a CMS API

prev: Support Plugins in TypeScript
next: Uglify error on build, but fine with dev?

I'm trying to build an API on top of our current CMS which could then use Nuxt on the frontend.

One of the problems i'm facing the API returns all of the pages as an array like so:

pages: [
  {
    ...
    "content_type": "content:",
  },
  {
    ...
    "content_type": "people:",
  },
]

This is on top of Django currently so we have tie this up with content.html and people.html then serve the relevant data.

What i'm trying to do with nuxt is something like:

- pages
  - content
    - index.vue
  - people
    - index.vue
    - _id.vue

Where it will match the folder based on the content_type from the API.

How would i best achieve this? In middleware, with custom routes?

Sorry for the vague question / issue i'm not that great of a problem solver when it comes to this kind of complexity :)

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c794">#c794</a>)</em></sub></div>