Skip to content

gitlab theme integration not working #3500

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

Closed
lazka opened this issue Jan 10, 2018 · 7 comments
Closed

gitlab theme integration not working #3500

lazka opened this issue Jan 10, 2018 · 7 comments
Labels
Needed: design decision A core team decision is required

Comments

@lazka
Copy link
Contributor

lazka commented Jan 10, 2018

Details

Expected Result

I've added a gitlab configuration to the conf.py as suggested in https://docs.readthedocs.io/en/latest/vcs.html#gitlab

Building locally everything works and the proper links to gitlab are shown on each page

Actual Result

As can be seen in the build log, it replaces all the configuration with "None"/False. No GitLab links are included on the pages.

@stsewd
Copy link
Member

stsewd commented Jan 10, 2018

I think the gitlab context variables are injected from the git url (check only urls containing gitlab.com).

https://github.com/rtfd/readthedocs.org/blob/d63caef10812fb5d373d1202fa6e30125fea62e6/readthedocs/doc_builder/backends/sphinx.py#L85-L88

But I think that these context variables have to be allowed to be redefined, I'm not sure if readthedocs.org support this (custom gitlab installations).

@humitos
Copy link
Member

humitos commented Jan 10, 2018

Hi @lazka !

I've added a gitlab configuration to the conf.py as suggested in docs.readthedocs.io/en/latest/vcs.html#gitlab

That documentation is obsolete I'd say (there is a PR that fixes that at #3490 --not sure if it fixes, but it removes that section and explains it better where/how it's used)

RTD autoinjects those variables when the repository is a GitHub.com, Bitbucket.com or Gitlab.com. At the moment, this integration is not supported for other domain.

@lazka
Copy link
Contributor Author

lazka commented Jan 11, 2018

Thanks for having a look.

So, afaics, it would be easy to fix by only replacing the user provided config if "display_gitlab" on the injection site is True (same with the others)?

Is this something you'd take contributions for?

If not, feel free to close this :)

@RichardLitt
Copy link
Member

So, afaics, it would be easy to fix by only replacing the user provided config if "display_gitlab" on the injection site is True (same with the others)?

That sounds good to me. One of the other maintainers should also weigh in before you start work on this, though! I'll label this as needing a design decision to make that clear.

@RichardLitt RichardLitt added the Needed: design decision A core team decision is required label Jan 11, 2018
@agjohnson
Copy link
Contributor

Having more conditional operations around setting the display_* options, or the GitHub/GitLab/Bitbuket URLs would be a good addition. For instance, if a user has these options defined, perhaps we shouldn't force the display_* and URL options on the context data.

Feel free to open a PR with your thoughts there, we can offer some more guidance on the technical implementation there.

@lazka
Copy link
Contributor Author

lazka commented Jan 23, 2018

ok, thanks

(related issue: readthedocs/sphinx_rtd_theme#536)

@stsewd
Copy link
Member

stsewd commented Mar 1, 2019

We can close this in favor of #2971. After that you can use that together with gitlab_host https://github.com/rtfd/sphinx_rtd_theme/blob/ddfdd35e6977f21fb1771734732756b0cf1d6bba/sphinx_rtd_theme/breadcrumbs.html#L59

@stsewd stsewd closed this as completed Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: design decision A core team decision is required
Projects
None yet
Development

No branches or pull requests

5 participants