We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f3f383b commit 215be8bCopy full SHA for 215be8b
main.py
@@ -8,8 +8,15 @@
8
src_dir = 'src'
9
out_dir = 'output'
10
11
+def linkup(a, b):
12
+ if '://' in a:
13
+ return a
14
+ else:
15
+ return b + a
16
+
17
env = Environment(loader=FileSystemLoader('templates'))
18
env.filters['markdown'] = markdown
19
+env.filters['linkup'] = linkup
20
template = env.get_template('main.html')
21
22
# Define custom variables passed over to the templates
templates/main.html
@@ -18,7 +18,7 @@
/_/ /_/ /_/\___/_/ /_/ /_/_/ /_/\____/|__/|__/</pre>
<ul class="navbar">
{% for link, title in navbar %}
- <a href="{{ backlink }}{{ link }}">{{ title }}</a>
+ <a href="{{ link | linkup(backlink) }}">{{ title }}</a>
{%- if not loop.last %}
23
<pre> | </pre>
24
{% endif %}
0 commit comments