How to fetch files from CDN with NuxtJS content module?

I want to fetch files from another server (e.g. a CDN) with the @nuxtjs/content module so that the .md files can be managed independently without Nuxt.js.

My current nuxt.config.js file looks like this:

export default {
  content: {
    dir: ''

Now I want to load the content in the pages/_slug.vue file:

    <NuxtContent :document="doc" />

  export default {
  async asyncData({ $content, params }) {
    const doc = await $content(params.slug || 'index').fetch();
    return { doc };

Now when I type in http://localhost:3000/some-page, I should get the corresponding file ( from the CDN. Instead, I get this error from Nuxt.js: /some-page not found.

What should I do to get it working and is this even possible with my current setup?


As told here:

This is not doable with the content module and is not planned to be done neither. A solution would be to manually fetch the files during the build time or alike.

You can maybe get some inspiration from this comment: or use another markdown parser.