diff --git a/_templates/oshw.html b/_templates/oshw.html index c3aefdf27fe04524e3bd9059e816d74b6802431d..a860642e5e0fff121c9208b3e118a5e19bbee36f 100644 --- a/_templates/oshw.html +++ b/_templates/oshw.html @@ -1,5 +1,5 @@ {% for board, path, oshw_id in oshw_details %} - {% if path in pagename %} + {% if path+'/' in pagename %} <div class="card bg-light mt-4 text-center"> <div class="card-header"> {{board}} diff --git a/conf.py b/conf.py index 596404e32ff289b755d0769a30937643ea90be98..39a245d86659d52969ff0c75eefa65487c913eb3 100644 --- a/conf.py +++ b/conf.py @@ -32,15 +32,16 @@ for (dirpath, dirnames, filenames) in os.walk(rst_epilog_path): # Configure PDF build and sidebar links latex_documents = [] pdf_paths = [] -pdf_list = [] oshw_details = [] + with open('conf.yml', 'r') as conf_file: conf_data = yaml.safe_load(conf_file) pdf_build_all = True + pdf_build = [] if(conf_data["pdf_build"] != "all"): for name in conf_data["pdf_build"].split(","): - pdf_list.append(name.lstrip()) + pdf_build.append(name.lstrip()) pdf_build_all = False for type, data in conf_data.items(): @@ -52,7 +53,7 @@ with open('conf.yml', 'r') as conf_file: pdf = data.get('pdf', False) # PDF build details - if(pdf and (name in pdf_list or pdf_build_all)): + if(pdf and (name in pdf_build or pdf_build_all)): pdf_paths.append(path) tex_name = '-'.join(path.split('/')[1:]) latex_documents.append((path+"/index", tex_name+".tex", "", author, "manual")) diff --git a/conf.yml b/conf.yml index 392d65b840d9bce0b0cd241e9d1d6c0542fe0a09..4923f39be3704a604f0cc442ea059f6b350059ec 100644 --- a/conf.yml +++ b/conf.yml @@ -1,22 +1,22 @@ -# YAML file to configure PDF build and sidebar links +# YAML file to configure PDF builds and sidebar links -# PDF buils configuration +# PDF builds configuration # # all: If you want to build PDFs of all the listed boards, books, projects, etc. # -# name1,name2,name3: If you want to build PDF for specific boards, books, projects, etc. +# name1, name2, name3: If you want to build PDF for specific boards, books, projects, etc. # Example: pdf_build: BeagleBone Black, BeagleBone AI-64 pdf_build: all -# Boards +# Boards # # Example: # boards: # name: -# path: <board path for index.rst> -# pdf: True/False -# oshw: <comma seprated file names from _static/images/oshw folder> +# path: First level board documentation path for board 'index.rst' +# pdf: True/False (optional, False if this 'pdf:' option is not added) +# oshw: Comma seprated file names from '_static/images/oshw' folder boards: BeagleBone Black: @@ -26,10 +26,43 @@ boards: BeagleBone AI-64: path: boards/beaglebone/ai-64 pdf: True + oshw: BeagleBone AI-64_US002120.svg + BeagleBone AI: + path: boards/beaglebone/ai + pdf: True + oshw: BeagleBone AI_US000169.svg + BeagleBone Blue: + path: boards/beaglebone/blue + pdf: True + oshw: BeagleBone Blue_US000064.svg + BeagleConnect Freedom: + path: boards/beagleconnect/freedom + pdf: True + oshw: BeagleConnect Freedom_US002175.svg + BeaglePlay: + path: boards/beagleplay + pdf: True + oshw: BeaglePlay_US002174.svg + BeagleV-Ahead: + path: boards/beaglev/ahead + pdf: True + oshw: BeagleV-Ahead_US002535.svg + BeagleV-Fire: + path: boards/beaglev/fire + pdf: True + oshw: BeagleV Fire_US002572.svg + BeagleY-AI: + path: boards/beagley/ai + pdf: True + oshw: BeagleY-AI_US002616.svg + PocketBeagle: + path: boards/pocketbeagle + pdf: True + oshw: PocketBeagle_US000083.svg + + # Books -books: - BeagleBone Cookbook: - path: books/beaglebone-cookbook +# Projects