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
* Add a setting to allow accessing individual gists without auth
This is a middle ground between the existing setting "Require Login",
which requires login to do anything at all, and having it off, which
shows a public list of gists and more generally allows discovering info
about the users/gists of the instance without login.
The idea of this setting is that it is "require login" for everything
except individual gists.
Fixes#228.
Co-authored-by: Thomas Miceli <tho.miceli@gmail.com>
* Fix gist content when going back to editing
* Fix not outputting non-truncated large files for editon/zip download
* Allow dashes in usernames
* Delete keys associated to deleted user
* Fix error message when there is no files in gist
* Show if there is not files in gist preview
* Fix log parsing for the 11th empty commit