diff --git a/.gitignore b/.gitignore index a304182..36713fb 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 3fc637b..0105428 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 5f8a7d9..8c29b24 100644 --- a/sconstruct +++ b/sconstruct @@ -99,7 +99,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)