title: How to keep nextjs index files inside their respective folders with next export
body: <p>I have a folder structure for <code>NextJs</code></p>
  <pre><code>pages
  ├── blog
  │   ├── index.jsx
  │   ├── other.jsx
  │   └── [slug].jsx
  └── index.js
  </code></pre>
  <p>On <code>npx next build &amp;&amp; npx next export</code> I get</p>
  <pre><code>├── 404.html
  ├── blog
  │   ├── a1.html
  │   ├── b2.html
  │   ├── c3.html
  │   └── other.html
  ├── blog.html
  └── index.html
  </code></pre>
  <p>I want it to respect my content structure and generate the following tree instead</p>
  <pre><code>├── 404.html
  ├── blog
  │   ├── index.html
  │   ├── a1.html
  │   ├── b2.html
  │   ├── c3.html
  │   └── other.html
  └── index.html
  </code></pre>
  <p>Notice how <code>pages/blog/index.jsx</code> got exported as <code>./blog.html</code> instead of expected <code>./blog/index.html</code></p>
  <p>How do I prevent the default and generate in the expected format?</p>
  <p>P.S: The entirety of the site is static and generated with help of <code>getStaticProps</code> and <code>getStaticPaths</code></p>