sphinxcontrib-srclinks
A sphinx extension to add links to various views of the documentation page source in the sphinx jinja2 template sidebar.
Contents
Features
Specify srclink_project once in sphinx conf.py
Adds links to {Source, Edit, History, Annotate} with {GitHub, BitBucket,} URLs to the sidebar.
Adds links to e.g. https://github.com/user/repo/ and https://github.com/user/repo/tree/[srclink_branchname]
Adds a <code> git clone schema://git@github.com/repo </code> block for each https, native git/hg, and ssh URL
(Sphinx HTML Documentation Sidebar)
This Page
Source RST
Source
Edit
History
Annotate
Usage
Clone the sphinxcontrib-srclinks repo:
git clone https://github.com/westurner/sphinxcontrib-srclinks
Copy srclinks.html to the _templates/srclinks.html folder:
DOCS="./docs/"
mkdir -p "$DOCS/_templates"
cp sphinxcontrib-srclinks/sphinxcontrib/srclinks/_templates/srclinks.html \
"$DOCS/_templates/srclinks.html"
BLD: conf.py: Configure the srclink_ settings in conf.py (test_html_page_context()):
# conf.py
# srclink settings
srclink_project = 'https://github.com/westurner/sphinxcontrib-srclinks'
#srclink_project = 'https://bitbucket.org/westurner/sphinxcontrib-srclinks'
#srclink_project = 'hg@bitbucket.org/westurner/sphinxcontrib-srclinks'
#srclink_project = 'git@bitbucket.org/westurner/sphinxcontrib-srclinks'
srclink_src_path = 'docs/'
#srclink_src_path = ''
srclink_branch = 'master'
#srclink_branch = 'develop'
BLD: conf.py: Add srclinks.html to html_sidebars in conf.py:
# Custom sidebar templates, maps document names to template names.
html_sidebars = {
'**': [
'localtoc.html',
'relations.html',
'searchbox.html',
'srclinks.html',
],
'index': [
'globaltoc.html',
'relations.html',
'searchbox.html',
'srclinks.html',
],
}
conf.py examples
License
BSD 3-Clause
Changelog
0.2.4 (2019-04-16)
DOC: Add Python 2 and 3 trove classifiers
0.2.3 (2019-04-16)
BUG: Python 3 Compatibility
0.2.2
ENH: _templates/srclinks.html: add class=’widget navlinks|srclinks
0.2.1
DOC: CHANGELOG.rst
0.2.0
BUG: backwards compatibility with edit_on_github
0.1.2
BLD: MANIFEST.in
0.1.1
DOC: LICENSE
0.1.0
First release as sphinxcontrib.srclinks
ENH: Added BitBucket support (hg@ (default) and git@)
TST: Added tests for BitBucket and GitHub support
0.0.1
Metadata
Release files for sphinxcontrib-srclinks 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sphinxcontrib-srclinks-0.2.4.tar.gz | 8.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinxcontrib_srclinks-0.2.4-py37-none-any.whl | Python 3.7 | none | any | Details |
Total release size: 19.2 kB
Release files / sphinxcontrib-srclinks-0.2.4.tar.gz
| Download URL | sphinxcontrib-srclinks-0.2.4.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c265d972eeda1898c5d21a62ac0f32a33a6866cae1a05b07483595dc2a4e0166
|
|
BLAKE2b-256 checksum How to use checksums |
fbc29717dd2992b08b80fd218333d91c52a8a1678c8b9f9aaf797d03612b09de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|
Release files / sphinxcontrib_srclinks-0.2.4-py37-none-any.whl
| Download URL | sphinxcontrib_srclinks-0.2.4-py37-none-any.whl |
|---|---|
| Size | 10.3 kB |
| Tags | Python 3.7 |
|
SHA-256 checksum How to use checksums |
1bd99b551f0733fa0c41e23564d539c02404c69529a7a4a0e0dc82d7650ae178
|
|
BLAKE2b-256 checksum How to use checksums |
fde874f46331980f5f22005c50b0e456f291cd994982bd4f4eea13727ecdd7e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
|
Security for sphinxcontrib-srclinks 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.