Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit f27967e2 authored by Deepak Khatri's avatar Deepak Khatri :dog:
Browse files

Fix PDF links with Jinja magic

parent f7edb98c
Branches
Tags
1 merge request!89Docs updates - chapter restructuring, images, and more
{% for board_path in boards_path %}
{% if board_path+'/' in pagename %}
<a role="button" href="{{docs_url}}/{{board_path}}.pdf" target="_blank">
{% set pdf_name = board_path.split('/')[-1] %}
<a role="button" href="{{docs_url}}/{{pdf_name}}.pdf" target="_blank">
<i class="fa-solid fa-download"></i> Download PDF
</a>
{% endif %}
......
......@@ -39,7 +39,6 @@ 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:
path = dirpath.replace("boards/","")
boards_path.append(path)
boards_path = set(boards_path)
......@@ -304,4 +303,4 @@ latex_elements = {
for board_path in boards_path:
board_tex_name = board_path.split('/')[-1]
latex_documents.append(("boards/"+board_path+"/index", board_tex_name+".tex", "", author, "manual"))
\ No newline at end of file
latex_documents.append((board_path+"/index", board_tex_name+".tex", "", author, "manual"))
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment