mirror of
https://github.com/thomiceli/opengist.git
synced 2025-05-14 00:02:10 +02:00

Due to the fact the file templates/base/base_header.html contains a <base> element, all relative URLs are interpreted as dependant on the base.[1] I've noticed the base isn't the current page, but the element linking to anchor identifier isn't using the complete URL to the gist page, which means that if you go to a gist, and try to click on the link that leads you to the file (which would make browsers automatically go down if it's a file that has a lot of lines), you get taken to the homepage, and unless you look at the URL closely you wouldn't notice the fragment/anchor part. I'm sure there's a better way of dealing with this, such as removing <base> from the template mentioned above, but due to the fact I'd like to have this work, I've made it put the full URL to this page. Something that might be good to do is making the relative URLs always be absolute, by having the '{{ $.c.ExternalUrl }}' thing everywhere where a relative URL would be, as that'd probably fix #415, and would allow for this commit to be reverted if that's desired. [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base