diff --git a/latest.images b/_static/epilog/latest.images similarity index 100% rename from latest.images rename to _static/epilog/latest.images diff --git a/production.images b/_static/epilog/production.images similarity index 100% rename from production.images rename to _static/epilog/production.images diff --git a/_static/images/oshw/ai-64_US002120.svg b/_static/images/oshw/BeagleBone AI-64_ai-64_US002120.svg similarity index 100% rename from _static/images/oshw/ai-64_US002120.svg rename to _static/images/oshw/BeagleBone AI-64_ai-64_US002120.svg diff --git a/_static/images/oshw/ai_US000169.svg b/_static/images/oshw/BeagleBone AI_ai_US000169.svg similarity index 100% rename from _static/images/oshw/ai_US000169.svg rename to _static/images/oshw/BeagleBone AI_ai_US000169.svg diff --git a/_static/images/oshw/black_US000011.svg b/_static/images/oshw/BeagleBone Black Wireless_black_US000011.svg similarity index 100% rename from _static/images/oshw/black_US000011.svg rename to _static/images/oshw/BeagleBone Black Wireless_black_US000011.svg diff --git a/_static/images/oshw/black_US000236.svg b/_static/images/oshw/BeagleBone Black_black_US000236.svg similarity index 100% rename from _static/images/oshw/black_US000236.svg rename to _static/images/oshw/BeagleBone Black_black_US000236.svg diff --git a/_static/images/oshw/blue_US000064.svg b/_static/images/oshw/BeagleBone Blue_blue_US000064.svg similarity index 100% rename from _static/images/oshw/blue_US000064.svg rename to _static/images/oshw/BeagleBone Blue_blue_US000064.svg diff --git a/_static/images/oshw/freedom_US002175.svg b/_static/images/oshw/BeagleConnect Freedon_freedom_US002175.svg similarity index 100% rename from _static/images/oshw/freedom_US002175.svg rename to _static/images/oshw/BeagleConnect Freedon_freedom_US002175.svg diff --git a/_static/images/oshw/beagleplay_US002174.svg b/_static/images/oshw/BeaglePlay_beagleplay_US002174.svg similarity index 100% rename from _static/images/oshw/beagleplay_US002174.svg rename to _static/images/oshw/BeaglePlay_beagleplay_US002174.svg diff --git a/_static/images/oshw/fire_US002572.svg b/_static/images/oshw/BeagleV Fire_fire_US002572.svg similarity index 100% rename from _static/images/oshw/fire_US002572.svg rename to _static/images/oshw/BeagleV Fire_fire_US002572.svg diff --git a/_static/images/oshw/ahead_US002535.svg b/_static/images/oshw/BeagleV-Ahead_ahead_US002535.svg similarity index 100% rename from _static/images/oshw/ahead_US002535.svg rename to _static/images/oshw/BeagleV-Ahead_ahead_US002535.svg diff --git a/_static/images/oshw/pocketbeagle_US000083.svg b/_static/images/oshw/PocketBeagle_pocketbeagle_US000083.svg similarity index 100% rename from _static/images/oshw/pocketbeagle_US000083.svg rename to _static/images/oshw/PocketBeagle_pocketbeagle_US000083.svg diff --git a/_templates/oshw.html b/_templates/oshw.html index 3dceed38fbf4cb8bd3f200dd9e9c2d47eac8ec35..9e61fe9eb05c02731d4875f9180254560cedaf51 100644 --- a/_templates/oshw.html +++ b/_templates/oshw.html @@ -1,10 +1,13 @@ -{% for board, oshw_id in oshw_details %} - {% if board+'/' in pagename %} +{% for board, path, oshw_id in oshw_details %} + {% if path+'/' in pagename %} <div class="card bg-light mt-4 text-center"> + <div class="card-header"> + {{board}} + </div> <div class="card-body"> <p class="card-text text-dark"> <a href="https://certification.oshwa.org/{{ oshw_id|lower }}.html" target="_blank"> - <img src="{{docs_url}}/_static/images/oshw/{{board}}_{{oshw_id}}.svg"/> + <img src="{{docs_url}}/_static/images/oshw/{{board}}_{{oshw_id}}.svg" alt="{{board}} OSHW mark"/> </a> </p> </div> diff --git a/_templates/pdf.html b/_templates/pdf.html new file mode 100644 index 0000000000000000000000000000000000000000..06f6eb3bb3cd0e36f24517f8f82920b202ed58a9 --- /dev/null +++ b/_templates/pdf.html @@ -0,0 +1,7 @@ +{% for board_path in boards_path %} + {% if board_path+'/' in pagename %} + <a role="button" href="{{docs_url}}/{{board_path}}.pdf"> + <i class="fa-solid fa-download"></i> Download PDF + </a> + {% endif %} +{% endfor %} diff --git a/boards/index.rst b/boards/index.rst index 68407df4106832bf194460753648e1228963629d..1460608ec81957737402a3aab5baa47575752527 100644 --- a/boards/index.rst +++ b/boards/index.rst @@ -38,18 +38,18 @@ started. .. toctree:: :maxdepth: 1 - /boards/beagleplay/index - /boards/beaglebone/ai-64/index - /boards/beaglebone/ai/index - /boards/beaglebone/black/index - /boards/beaglebone/blue/index - /boards/beaglebone/index - /boards/beaglev/ahead/index - /boards/beaglev/fire/index - /boards/pocketbeagle/original/index - /boards/beagleconnect/freedom/index - /boards/beagleconnect/index - /boards/beagleboard/index - /boards/capes/index - /boards/terms-and-conditions + beagleplay/index + beaglebone/ai-64/index + beaglebone/ai/index + beaglebone/black/index + beaglebone/blue/index + beaglebone/index + beaglev/ahead/index + beaglev/fire/index + pocketbeagle/original/index + beagleconnect/freedom/index + beagleconnect/index + beagleboard/index + capes/index + terms-and-conditions diff --git a/conf.py b/conf.py index 65508b43356e4fc5af8e5f91a6a5868399792874..aec47d6a143a1332b66b57096324911184abfe2f 100644 --- a/conf.py +++ b/conf.py @@ -18,20 +18,30 @@ sys.path.append(str(Path(".").resolve())) rst_epilog ="" # Add latest images to rst_epilog -rst_epilog_files = ['latest.images', 'production.images'] -for rst_epilog_file in rst_epilog_files: - with open(rst_epilog_file) as f: - rst_epilog += f.read() +rst_epilog_path = "_static/epilog/" +for (dirpath, dirnames, filenames) in os.walk(rst_epilog_path): + for filename in filenames: + with open(dirpath + filename) as f: + rst_epilog += f.read() # Board OSHWA certification information -oshw_logos_path = "_static/images/oshw" +oshw_logos_path = "_static/images/oshw/" oshw_details = [] for (dirpath, dirnames, filenames) in os.walk(oshw_logos_path): for filename in filenames: if filename.endswith('.svg'): oshw_logo_name = filename.split(".")[0] oshw_details.append(oshw_logo_name.split('_')) - + +# Unique boards path information +boards_path = [] +for board, path, oshw_id in oshw_details: + for (dirpath, dirnames, filenames) in os.walk("boards"): + if '/'+path+'/' in dirpath+'/': + if path+'/' not in dirpath: + boards_path.append(dirpath) +boards_path = set(boards_path) + # -- Project information -- project = 'BeagleBoard Docs' copyright = '2024, BeagleBoard.org Foundation' @@ -267,11 +277,14 @@ html_context = { "edit_page_url_template": "{{ my_vcs_site }}{{ file_name }}", "edit_page_provider_name": "OpenBeagle", "my_vcs_site": "https://openbeagle.org/docs/docs.beagleboard.io/-/edit/main/", - "oshw_details": oshw_details + "oshw_details": oshw_details, + "boards_path": boards_path } # -- Options for LaTeX output -- - +latex_engine = "xelatex" +latex_logo = "_static/images/logo-latex.pdf" +latex_documents = [] latex_elements = { "papersize": "a4paper", "maketitle": open("_static/latex/title.tex").read(), @@ -287,8 +300,7 @@ latex_elements = { ) ), } -latex_engine = "xelatex" -latex_logo = "_static/images/logo-latex.pdf" -latex_documents = [ - ("index-tex", "beagleboard-docs.tex", "BeagleBoard Docs", author, "manual"), -] \ No newline at end of file + +for board_path in boards_path: + board_tex_name = board_path.split('/')[-1] + latex_documents.append([(board_path, board_tex_name+".tex", "", author, "manual"),]) \ No newline at end of file