const path = require('path');

export default {
  mode: 'universal',
  /*
  ** Headers of the page
  */
  head: {
    title: process.env.npm_package_name || '',
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: process.env.npm_package_description || '' },
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
    ],
  },
  /*
  ** Customize the progress-bar color
  */
  loading: { color: '#fff' },
  /*
  ** Global CSS
  */
  css: [
  ],
  /*
  ** Plugins to load before mounting the App
  */
  plugins: [
  ],
  /*
  ** Nuxt.js dev-modules
  */
  buildModules: [
    // Doc: https://github.com/nuxt-community/nuxt-tailwindcss
    '@nuxtjs/tailwindcss',
  ],
  /*
  ** Nuxt.js modules
  */
  modules: [
  ],
  /*
  ** Build configuration
  */
  build: {
    /*
    ** You can extend webpack config here
    */
    /* eslint-disable-next-line no-unused-vars */
    extend(config, ctx) {
      config.module.rules.push(
        {
          test: /\.md$/,
          include: path.resolve(__dirname, 'content'),
          loader: 'frontmatter-markdown-loader',
        },
      );
    },
  },
};

@@ -1,31 +1,216 @@
-const 
+import glob from 'glob';%0Aimport path from 'path';%0A%0Aconst dynamicArticleRoutes = () =%3E %5B%5D.concat(%0A  glob.sync('articles/*.md', %7B cwd: 'content' %7D)%0A    .map((file
 path
+)
  =
- require('path'
+%3E %60blog/$%7Bpath.basename(filepath, '.md')%7D%60),%0A
 );%0A%0A
@@ -1425,11 +1425,66 @@
 %7D,%0A  %7D,%0A
+  generate: %7B%0A    routes: dynamicArticleRoutes(),%0A  %7D,%0A
 %7D;%0A

Generate dynamic routes for articles.