Closed jlengstorf closed 3 years ago
if I run this, /blog ends up not working in the built site because the blog.js page is created as blog.html, which is overridden by the blog/ directory
I couldn't replicate "not working" here, could you be more specific about what behavior you're seeing and what http server you're using?
It works for me with this site and running npx serve public
: https://github.com/ChristopherBiscardi/toast-blog-blog-index-repro/tree/ff671c7197bb4a112732b96922ae950216b4a4eb
I get this output, which serves me blog.html on /blog.
❯ ls -R public
blog index.html styles.css
blog.html src web_modules
public/blog:
some-post.html some-post.js some-post.json
hmm, looks like it's an http-server
thing. my repro doesn't have this problem when I deploy to Netlify https://optimistic-curie-9bbe4e.netlify.app/blog
using MDX, I have the following setup:
the blog uses
sourceMdx
:if I run this,
/blog
ends up not working in the built site because theblog.js
page is created asblog.html
, which is overridden by theblog/
directorythe fix for this, I believe, is to generate
blog/index.html
instead ofblog.html
. functionally these should be equivalent, but it allows for defining a directory rootwithout this, I have to create
src/pages/blog/index.js
and the slug is wierd:this isn't the end of the world, but it's unintuitive