[IMP] point_of_sale: re-use the /web provided font-awesome font
[odoo/odoo.git] / doc / conf.py
index f36c3b1..086e3ec 100644 (file)
@@ -20,6 +20,7 @@ needs_sphinx = '1.1'
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 extensions = [
+    'sphinx.ext.ifconfig',
     'sphinx.ext.todo',
     'sphinx.ext.autodoc',
     'sphinx.ext.intersphinx',
@@ -45,7 +46,7 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'odoo'
-copyright = u'2014, OpenERP s.a.'
+copyright = u'OpenERP S.A.'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
@@ -165,6 +166,15 @@ html_sidebars = {
 # base URL from which the finished HTML is served.
 #html_use_opensearch = ''
 
+latex_elements = {
+    'papersize': r'a4paper',
+    'preamble': u'''\\setcounter{tocdepth}{2}
+''',
+}
+
+# default must be set otherwise ifconfig blows up
+todo_include_todos = False
+
 intersphinx_mapping = {
     'python': ('https://docs.python.org/2/', None),
     'werkzeug': ('http://werkzeug.pocoo.org/docs/', None),
@@ -183,6 +193,9 @@ def setup(app):
     app.connect('html-page-context', versionize)
     app.add_config_value('versions', '', 'env')
 
+    app.connect('html-page-context', analytics)
+    app.add_config_value('google_analytics_key', False, 'env')
+
 def canonicalize(app, pagename, templatename, context, doctree):
     """ Adds a 'canonical' URL for the current document in the rendering
     context. Requires the ``canonical_root`` setting being set. The canonical
@@ -208,6 +221,12 @@ def versionize(app, pagename, templatename, context, doctree):
         if vs != app.config.version
     ]
 
+def analytics(app, pagename, templatename, context, doctree):
+    if not app.config.google_analytics_key:
+        return
+
+    context['google_analytics_key'] = app.config.google_analytics_key
+
 def _build_url(root, branch, pagename):
     return "{canonical_url}{canonical_branch}/{canonical_page}".format(
         canonical_url=root,