I have lots of links in markdown that my SEO magician now wants to have trailing slashes on. I’ve done the find/replace, but the final slash is being removed in markdown processing.
If I put in
(/link/to/page/) I end up with
<a href="/link/to/page"></a>. Why?
If I escape the last slash
(/link/to/page\/) I get what I am looking for, but this does not feel like a good solution. The next person that edits the page is likely to forget as it is an add syntax.
I’m not sure there’s any benefit of having trailing slashes. When I did a quick search it basically turned up people saying you need to be consistent, either use slash or don’t at the end, other than that it makes no difference to SEO.
That said, there’s a lot of calculation going on within Grav when you put a path in the markdown for a link. It basically recalculates your current relative position, and resolves any relative links, it also handles other scenarios, that’s why the link is changing.
Thanks for the reply. I have a Grav install sitting inside a Wordpress install and Apache keeps putting a trailing slash on that folder, which is the Grav root. Trying to be consistent per the SEO request, I was trying to add trailing slashes everywhere else, but I can see I’m fighting a losing battle.