title: Next.js dynamic page params for static export
body: <p>I have page which depends on route params (ex.: slug) like so <code>http://example.com/blog/:slug</code>. This route path is defined properly in my next.config.js file:</p>
  
  <pre><code>module.exports = withPlugins(plugins, {
    exportPathMap: (defaultPathMap) =&gt; {
      return {
        '/': { page: '/home/home' },
        '/blog/:slug': { page: '/careers/careers' }
      }
    }
  });
  </code></pre>
  
  <p>This works fine when running the project in dev mode but once i export the project as static the route is not accessible and i get the regular 404 error from next.</p>
  
  <p>Is there a way to fix this without using query parameters? 
  <code>http://example.com/?slug=123</code></p>
  
  <p>This solution <a href="https://github.com/zeit/next.js/blob/canary/examples/with-static-export/next.config.js" rel="noreferrer">https://github.com/zeit/next.js/blob/canary/examples/with-static-export/next.config.js</a> is also not acceptable since the posts come from backend CMS</p>