| orphan: |
|---|
The Odoo Documentation theme is a bootstrap-based mix of http://odoo.com and http://getbootstrap.com with additional changes and additions, bundled as a Sphinx theme.
The main style file is _themes/odoodoc/static/style.less, it is not
converted on the fly and must be compiled manually when altere, using the
official node-based lessc tool.
odoodoc must be added as an extension to a project using the theme, it
fixes some discrepancies between bootstrap and Sphinx and adds a few
features:
- toctree bullet lists (HTML
<ul>) are given thenavclass - the main navigation bar also gets the
navbar-navandnavbar-rightset on its root (navbar-rightcould probably be handled in CSS to avoid having it in the markup) - tables are given the
tableclass - colspecs are removed from tables, tables should autolayout
data-attributes are copied straight from the docutils node to the output HTML node- an
odoopygments style based on the bootstrap documentation's - the normal Sphinx sidebars are suppressed and a new sidebar is injected in
div.document(sidebar1is outside in the base Sphinx layout) - HTML5 doctype
versions switcher, uses the
canonical_rootsetting and an additionalversionssetting which should be a comma-separated list of available versions. Appends the each version and page name to the root, and displays a list of those links on the current pagecanonical urls, requires a
canonical_rootsetting value, and optionally acanonical_branch(default:master):guilabel:`Edit on github` link in Sphinx pages if
github_userandgithub_projectare provided:guilabel:`[source]` links in autodoc content links to github with the same requirements (requires Sphinx 1.2)
aphorismclass for admonitions, makes the first line of the admonition inline and the same size as the admonition category (mostly for short, single-phrase admonitions)exercisedirective, mostly for training-type documents, thesolutionstag can be used to conditionally show e.g. solutionsa number of straight-to-HTML directives:
h:diva straight div, can be used instead of
container(which adds thecontainerclass to the div it generates, that's really not compatible with Bootstrap)h:addressgenerates an
<address>node- a bunch of roles straight to HTML inline
mark,insert,delete,strikethrough,small`, ``kbdandvargenerate the corresponding HTML element
- Sphinx 1.1, 1.2 for code Python code links
- sphinx-patchqueue (for the content, not the theme)