So I’m using middleman server for dev of course, and I use markdown for my page syntax. I’m running into an issue where “middleman server” doesn’t use trailing slashes for index pages and that causes my links to fail.
Let provide an example. I have a link on my site to /references, like so:
[References](/references)
Then, on my /references/index.html page I have more links, like this:
[Reference 1](ref_1.html)
[Reference 2](ref_2.html)
The issue is that when I load up “/references” in my browser, middleman doesn’t add a trailing slash, so the links on that page think that they’re relative to “/” instead of relative to “/references”. i.e clicking on Reference 1 takes me to “/ref_1.html” instead of “/references/ref_1.html”.
If I do a middleman build and host it with a different web server (like jekyll), the trailing slash is added automatically by the server (if I browse to /references I get a 301 to /references/) and everything works fine.
Is there any way to fix this in my dev environment? It’s a huge pain!
Thanks in advance.