canonical / canonical-sphinx

Extension and theme to create great Canonical-branded documentation
GNU Lesser General Public License v3.0
2 stars 6 forks source link

Broken GitHub contributor link in footer #56

Open medubelko opened 1 month ago

medubelko commented 1 month ago

Due to improper string composition in the footer, the Edit this page on GitHub link has a malformed path.

https://github.com/canonical/canonical-sphinx/blob/c7149c3b1d76e4284be740f9ce5031e8f3cdf9ef/canonical_sphinx/theme/templates/footer.html#L124

All the Starcraft repos have this problem. Example: https://documentation.ubuntu.com/rockcraft/en/stable/

Originally reported in https://github.com/canonical/rockcraft/issues/705

SecondSkoll commented 1 month ago

I believe you need to add an entry to the HTML context, otherwise the github_version will be the commit and not the branch. It should be something like:

'github_version': 'main',
medubelko commented 1 month ago

That results in https://github.com/canonical/rockcraft/edit/maindocsindex.rst. In either case there are missing slashes, hence my suggestion that it was a string composition issue.

It looks like this might only affect Starcraft repos; Anbox Cloud doesn't have this problem. At that, it might be because it's inheriting from an old version of the starter pack, not the extension. I'll report back once my team has rebased their docs.

SecondSkoll commented 1 month ago

Strange, from the history there's no change between the 0.1.0 version and now.