Giter Site home page Giter Site logo

westurner / sphinxcontrib-srclinks Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 3.0 24 KB

Sphinx extension to add project links to the sidebar. https://pypi.python.org/pypi/sphinxcontrib-srclinks

Home Page: https://pypi.python.org/pypi/sphinxcontrib-srclinks

License: BSD 3-Clause "New" or "Revised" License

Python 89.53% HTML 8.65% Makefile 1.82%
sphinx sphinx-extension

sphinxcontrib-srclinks's Introduction

sphinxcontrib-srclinks

A sphinx extension to add links to various views of the documentation page source in the sphinx jinja2 template sidebar.

Contents

Features

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 = '[email protected]/westurner/sphinxcontrib-srclinks'
#srclink_project = '[email protected]/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

sphinxcontrib-srclinks's People

Contributors

westurner avatar xuhdev avatar

Stargazers

 avatar James Tocknell avatar Jared Dillard avatar  avatar

Watchers

 avatar 天苯 avatar  avatar

Forkers

xuhdev parveen14

sphinxcontrib-srclinks's Issues

GitLab support

It would be neat if this could also support GitLab (including custom instances) 😄

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.