Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Standard Open Knowledge Foundation sphinx theme resembling that on http://okfn.org/

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 static
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.markdown
Octocat-spinner-32 footer.html
Octocat-spinner-32 globaltoc.html
Octocat-spinner-32 layout.html
Octocat-spinner-32 localtoc.html
Octocat-spinner-32 searchbox.html
Octocat-spinner-32 theme.conf
README.markdown

A bootstrap-based theme for Sphinx Documentation generator developed for use at the Open Knowledge Foundation (but usuable by anyone!).

Theme Options

  • logo_icon: logo icon url (can be local in _static) to use in top bar (in addition to title). Will be rendered with a height of 30px.
  • git_repo: git(hub) repository link for the fork me badge. Example: https://github.com/okfn/sphinx-theme-okfn
  • google_analytics_id: your google analytics id

Configuring the sidebar

Use the standard sphinx sidebars setup: http://sphinx.pocoo.org/config.html#confval-html\_sidebars

E.g. to have the global ToC there just add globaltoc.html to the list. To have local table of contents (for current page) add localtoc.html to the list.

Configuring the Footer

Override the footer.html template.

Configuring the Top Bar

You can add navigation links (and other material) to the top bar by overriding the navbar-nav.html template. This material will fit into the bootstrap topbar after the main brand link on the left. An example navbar-nav would be:

<ul class="nav">
  <li><a href="">my link</a></li>
</ul>

How to Use

Imagine you have a sphinx project with layout like:

source
  conf.py
{other-dirs ...}  

You would do:

git submodule add git://github.com/okfn/sphinx-theme-okfn.git source/_themes/sphinx-theme-okfn
# then commit ...
git commit -m "Adding submodule for sphinx-theme-okfn"

Then in conf.py you would config like:

sys.path.append(os.path.abspath('_themes'))
html_theme_path = ['_themes']
html_theme = 'sphinx-theme-okfn'
html_theme_options = {
        'logo_icon': ...
        'google_analytics_id': ...
    }

License

Copyright (c) 2012 Open Knowledge Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Something went wrong with that request. Please try again.