Open westurner opened 1 year ago
this would be a really awesome feature, as you mention it seems like it should be possible using linkcode and viewcode it's possible to do edit buttons on documentation pages that bring you to the github markdown file, would be great to have links to full source files as well
Hey all, I wrote a gist today that could be adapted as a solution to this issue: https://gist.github.com/rainbowphysics/505e35a7a1e9545d5a6cde22f6ca9558
@pv If we went ahead with implementing this functionality, would you prefer it: integrated into sphinx.ext.linkcode, or added as a new ext module?
Is your feature request related to a problem? Please describe. As a docs reader, I want to read the source in the viewcode interface and then open it in {Github, Gitlab,}.
Describe the solution you'd like
[ ] Another config option (?) like
sphinx.ext.linkcode
but simpler:f'{placeholders}/if'
it's not a callable?please feel free to just rip from or merge from e.g. sphinxcontrib-srclinks, which expands to HTTPs and SSH urls from conf.py values
test_html_page_context( "westurner/dotfiles", "develop", "doc/", "westurner/dotfiles", project_url="https://github.com/westurner/dotfiles", project_https_url="https://github.com/westurner/dotfiles", project_ssh_url="ssh://git@github.com/westurner/dotfiles", project_native_url="git://github.com/westurner/dotfiles")
test_html_page_context( "https://github.com/westurner/dotfiles", "develop", "doc/", "westurner/dotfiles", project_https_url="https://github.com/westurner/dotfiles", project_ssh_url="ssh://git@github.com/westurner/dotfiles", project_native_url="git://github.com/westurner/dotfiles")
test_html_page_context( "https://bitbucket.org/westurner/dotfiles",
Describe alternatives you've considered
Additional context :space_invader: