Skip to content
Snippets Groups Projects
Verified Commit 1f66475c authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

add relative url to all links in script

parent c9c1bb80
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,9 @@ def build_link(title, href):
elif ('handbook-annexes' in href):
href = href.replace('handbook-annexes', 'handbook').strip()
# add relative url
href = "{{ '" + href + "' | relative_url }}"
return f'\t\t\t<li><a href="{href}">{title}</a></li>\n'
def build_section_start(title, shortcut):
......@@ -198,8 +201,8 @@ for s in sections:
index += "\n</div>"
## add link to return to main index
index += "<br><center><a href='/'>go back</a></center>"
index += "<br><center><a href='/cards'>Overview of all HowTo cards</a></center>"
index += """<br><center><a href="{{ '/' | relative_url }}">go back</a></center>"""
index += """<br><center><a href="{{ '/cards' | relative_url }}">Overview of all HowTo cards</a></center>"""
# output the index
#print(index)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment