Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow page index to be one later part of pathname #291
I'm building a speaker site and hoping to let it host my slides as well as a home page. The slides will have urls like this: http://my.site.cc/slides/yyyy-mm--topic-of-my-talk/. This works with my other slides built with reveal.js. But it does not work with mdx-deck.
When I serve the deck directly, it works just as expected. But when I serve my site's root directory, it does not render any content although the JS is in place and the root is rendered with a few dummy nodes. Then when I slide with keyboard, the URL becomes .../NAN.
I looked around a little bit and find out that here it fixes to reading only the index 1 of pathname, which is possibly causing the problem in routing.
I'm wondering, would it be OK for here to use, say, the last part or the last number of pathname?
There is a possible solution I post in my fork here:
Note that you may need a custom 404 page to make sure github pages works like a real SPA.
<base href="/mdx-deck/"> Redirecting ... <script> location.href = '.'; </script>
I think this issue should be reopen and make it to the main branch. What do you think? @jxnblk
It's currently undocumented, but the CLI should now support a