-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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 Gitlab" not showing #10057
Comments
Problem found. Readthedocs is overwriting html_context (why??). Here is the conf.py as generated by Read the Docs:
I looked at how the file is generated and here is what I found: https://github.com/readthedocs/readthedocs.org/blob/main/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl
So there is a flag called Do you have to pay to set your own edit button correctly? |
There was a PR 5 years ago that added this feature flag: #4349 As far as I understand it, the idea is to use the settings set by the user on the dashboard and not the ones set in conf.py (which is strange but why not, I'm not an expert in Read the Docs). So I think the true issue is there is no GUI to let the user sets the gitlab settings when the repository is not on gitlab.com but on a self hosted instance. |
Hello, I also want to add link to gitlab and I try to used Flag # add flag for readthedocs https://docs.readthedocs.io/en/stable/feature-flags.html#available-flags
DONT_OVERWRITE_SPHINX_CONTEXT = 'dont_overwrite_sphinx_context' and also try global variables for readthedocs |
@sravel hi, the feature flag can’t be enabled with an environment variable. It can only be done by the readthedocs’ admins. I contacted them with the support page, they enabled the flag and now it’s working. The true issue is there is no way to configure it properly without this flag. |
This was done to keep backwards compatibility, but I think we should just enable it for all projects, maybe a small set of projects will break, but the solution should be easy. @sravel please contact support via https://readthedocs.org/support/. |
I'm 👍🏼 on enabling this broadly and start thinking about removing this feature flag completely. We can start by enabling it by default to all new projects if we are not already. |
Closing this in favor of #10293. |
Details
Expected Result
I'm trying to replace the default link "View page source" by "Edit on Gitlab". I have added this html context to my conf.py and recompiled.
Actual Result
The link remains "View page source" and not "Edit on Gitlab". Am I doing something wrong ?
The text was updated successfully, but these errors were encountered: