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

:github_url: as a theme option #529

Closed
eine opened this issue Dec 24, 2017 · 4 comments
Closed

:github_url: as a theme option #529

eine opened this issue Dec 24, 2017 · 4 comments
Labels
Needed: documentation Documentation is required

Comments

@eine
Copy link

eine commented Dec 24, 2017

I am trying to reproduce locally the output I get in RTD (see readthedocs-docker-images#47). According to the README here, it seems that I need to manually add :github_url: to each page in order to have 'Edit on GitHub' instead of 'View page source'. I would expect this option to be available as a theme option, so that the same sources produce the same result in RTD and locally.

@jessetan
Copy link
Contributor

You can reproduce this locally by changing your conf.py:

html_context = {
  'display_github': True,
  'github_user': 'username',
  'github_repo': 'reponame',
  'github_version': 'master'
}

Related to #156.

@eine
Copy link
Author

eine commented Dec 27, 2017

@jessetan Thanks a lot. That's exactly what I needed. However, I had to slightly modify it:

'display_github': True,
'github_user': 'username',
'github_repo': 'reponame',
'github_version': 'branch/doc/'

Note the subdir after the branch/version, and the trailing slash.

I close this, because the question is solved. But you might want to reopen it to keep track of the pending documentation.

@Blendify
Copy link
Member

Blendify commented Feb 1, 2018

This is a duplicate of #465

@peterjc
Copy link

peterjc commented Aug 14, 2019

You don't need to have a slash in github_version, see example here:

#231 (comment)

I'll add a comment on #465.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needed: documentation Documentation is required
Projects
None yet
Development

No branches or pull requests

4 participants