From d3ab54bb07873e120df9d624879d124e3fa7b59a Mon Sep 17 00:00:00 2001 From: "Antoine Vandevenne (anv)" Date: Fri, 29 Jan 2021 09:27:18 +0100 Subject: [PATCH] sort conf.py sections --- Makefile | 4 ++ conf.py | 148 +++++++++++++++++++++++++++---------------------------- 2 files changed, 78 insertions(+), 74 deletions(-) diff --git a/Makefile b/Makefile index 2d93fb062..349f6fd0a 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ all: html help: @echo "Please use 'make ' where is one of" @echo " html to build the documentation to HTML" + @echo " fast to build the documentation to HTML with shallow menu (faster)" @echo " clean to delete the build files" clean: @@ -35,6 +36,9 @@ html: extensions/odoo_theme/static/style.css $(SPHINX_BUILD) -c $(CONFIG_DIR) -b html $(SPHINXOPTS) $(SOURCE_DIR) $(BUILD_DIR)/html @echo "Build finished." +fast: SPHINXOPTS += -A collapse_menu=True +fast: html + extensions/odoo_theme/static/style.css: extensions/odoo_theme/static/*.scss @echo "Compiling stylesheets..." pysassc $(subst .css,.scss,$@) $@ diff --git a/conf.py b/conf.py index eaabd9cda..1c893f677 100644 --- a/conf.py +++ b/conf.py @@ -9,6 +9,49 @@ from sphinx.util import logging _logger = logging.getLogger(__name__) +#=== General configuration ===# + +# The version info for the project being documented, acts as replacement for |version|, also used in +# various other places throughout the built documents. +version = '12.0' +# The full version, including alpha/beta/rc tags. Acts as replacement for |release|. +release = '12.0' + +# The minimal Sphinx version required to build the documentation. +needs_sphinx = '3.0.0' + +# The suffix of source filenames. +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'odoo' +copyright = 'Odoo S.A.' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# List of patterns, relative to source directory, that match files and directories to ignore when +# looking for source files. +exclude_patterns = [ + 'locale', + 'README.*', + 'bin', 'include', 'lib', +] + +# The RST text role to use when the role is not specified. E.g.: `example`. +# We use 'literal' as default role for markdown compatibility: `foo` behaves like ``foo``. +# See https://docutils.sourceforge.io/docs/ref/rst/roles.html#standard-roles for other roles. +default_role = 'literal' + +# If true, '()' will be appended to :func: etc. cross-reference text. +add_function_parentheses = True + +#=== Extensions configuration ===# + # Add extensions directory to PYTHONPATH extension_dir = Path('extensions') sys.path.insert(0, str(extension_dir.absolute())) @@ -27,20 +70,6 @@ else: ) odoo_dir_in_path = False -# Monkeypatch PHP lexer to not require