Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit on GitHub button does not work in documentation (stable) #9755

Closed
krassowski opened this issue Feb 6, 2021 · 5 comments
Closed

Edit on GitHub button does not work in documentation (stable) #9755

krassowski opened this issue Feb 6, 2021 · 5 comments
Labels
bug status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.

Comments

@krassowski
Copy link
Member

When on https://jupyterlab.readthedocs.io/en/stable/# the Edit on GitHub button goes to https://github.com/jupyterlab/jupyterlab/blob/origin/3.x/docs/source/index.rst which does not exist; the origin part is spurrious, the correct URL would be: https://github.com/jupyterlab/jupyterlab/blob/3.x/docs/source/index.rst.

Probably trivial to fix, but opening the issue anyways, i.e. how could we make sure that it works in the future. Would it be worth to set up an automated check for dead links in documentation?

@krassowski
Copy link
Member Author

krassowski commented Feb 6, 2021

the latest tag works ok. It seems that the url is configured in RTD because the version in conf.py is set to master on 3.x:

"github_version": "master", # Version

So it must be using the github_url from meta instead:

{% if check_meta and 'github_url' in meta %}
<!-- User defined GitHub URL -->
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% else %}
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% endif %}

but this is not appearing in the code anywhere else so I assume it is somehow set by RTD.

@krassowski krassowski added the bug label Feb 9, 2021
@jasongrout
Copy link
Contributor

Is that what these lines are doing?

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
import os
_version_py = os.path.join('..', '..', 'jupyterlab', '_version.py')
version_ns = {}
with open(_version_py, mode='r') as version_file:
exec(version_file.read(), version_ns)
# The short X.Y version.
version = '%i.%i' % version_ns['version_info'][:2]
# The full version, including alpha/beta/rc tags.
release = version_ns['__version__']

@krassowski
Copy link
Member Author

I don't think so. It seems to be related to readthedocs/readthedocs.org#1637

@whurd-redcanary
Copy link

I don't think so. It seems to be related to readthedocs/readthedocs.org#1637

It looks as if you need to update the version of sphinx running https://jupyterlab.readthedocs.io/ ?

sfstoolbox/sfs-python#48

@krassowski
Copy link
Member Author

I just confirmed that the workaround in #11149 fixed both the links on stable and latest versions (latest stopped working recently), closing.

@github-actions github-actions bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Mar 26, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

No branches or pull requests

3 participants