From ffae01fd0c9613a79d266c897e2042a6ac42259c Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Thu, 5 Mar 2020 14:03:23 +0100 Subject: [PATCH] config: move project specifics to own conf.py Each target doc build can have it own parameters. --- doc/api/conf.py | 14 ++++++++++++++ doc/common/conf.py | 16 ++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/doc/api/conf.py b/doc/api/conf.py index 607907e..f933bef 100644 --- a/doc/api/conf.py +++ b/doc/api/conf.py @@ -4,4 +4,18 @@ # Pybricks documentation build configuration file # import os + +# General information about the project. +project = 'pybricks-micropython' +copyright = '2018-2020 The Pybricks Authors' +author = '' + +_TITLE = 'Pybricks Modules and Examples' +_DISCLAIMER = 'LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS EV3 logo are\ + trademarks and/or copyrights of the LEGO Group of companies \ + which does not sponsor, authorize or endorse this site.' + +html_logo = '../common/images/pybricks-logo-small.png' +latex_logo = '../common/images/pybricks-logo-large.png' + exec(open(os.path.abspath("../common/conf.py")).read()) diff --git a/doc/common/conf.py b/doc/common/conf.py index 5a75d7b..5848391 100644 --- a/doc/common/conf.py +++ b/doc/common/conf.py @@ -17,6 +17,8 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # +# flake8: noqa + import os import sys from docutils import nodes @@ -64,15 +66,6 @@ source_suffix = '.rst' # The master toctree document. master_doc = 'index' -# General information about the project. -project = 'pybricks-micropython' -copyright = '2018-2019 The Pybricks MicroPython Authors' -author = '' - -_TITLE = 'Pybricks Modules and Examples' -_DISCLAIMER = 'LEGO, the LEGO logo, MINDSTORMS and the MINDSTORMS EV3 logo are\ - trademarks and/or copyrights of the LEGO Group.' - # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. @@ -158,8 +151,6 @@ else: 'disclaimer': _DISCLAIMER, } -html_logo = '../common/images/pybricks-logo-small.png' - # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # @@ -249,9 +240,6 @@ latex_documents = [ author, 'manual'), ] -latex_logo = '../common/images/pybricks-logo-large.png' - - # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples