From a0e3b7d72ee7edae520cd37ec631a1523557a914 Mon Sep 17 00:00:00 2001 From: Julien Cochuyt Date: Sun, 14 Oct 2018 14:07:51 +0200 Subject: [PATCH] Support separate technical and user documentations (#6) --- .gitignore | 1 - buildVars.py | 5 +++++ sconstruct | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 6d124be..84769a1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ addon/doc/*.css -addon/doc/en/ *_docHandler.py *.html *.ini diff --git a/buildVars.py b/buildVars.py index 28b61fb..5c45bd0 100644 --- a/buildVars.py +++ b/buildVars.py @@ -35,6 +35,11 @@ "addon_updateChannel" : None, } +# Specify whether this add-on provides a single documentation or separate +# technical and user documentations. +# If set to `True`, the `readme.md` file at the root of this project is used +# as the source for the user documentation in the base language. +useRootDocAsUserDoc = True import os.path diff --git a/sconstruct b/sconstruct index 2069cd1..5aac402 100644 --- a/sconstruct +++ b/sconstruct @@ -98,7 +98,7 @@ def createAddonHelp(dir): cssPath = os.path.join(docsDir, "style.css") cssTarget = env.Command(cssPath, "style.css", Copy("$TARGET", "$SOURCE")) env.Depends(addon, cssTarget) - if os.path.isfile("readme.md"): + if buildVars.useRootDocAsUserDoc and os.path.isfile("readme.md"): readmePath = os.path.join(docsDir, "en", "readme.md") readmeTarget = env.Command(readmePath, "readme.md", Copy("$TARGET", "$SOURCE")) env.Depends(addon, readmeTarget)