diff options
author | rsiddharth <s@ricketyspace.net> | 2020-07-25 21:20:51 -0400 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2020-07-25 21:20:51 -0400 |
commit | 31c1305939101e1105f36dc211f496ea5bd74173 (patch) | |
tree | dff53cd913306c5f89a0cfa1e08d3650b7155985 /bin/html | |
parent | 219b86dfe891f6072577889f75525367a399e101 (diff) |
bin/html: add lhref.
* bin/html (lhref): New function.
Diffstat (limited to 'bin/html')
-rw-r--r-- | bin/html | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -138,6 +138,13 @@ def markdown(c): return r.stdout +def lhref(sec, s, l): + if l == 'en': + return '<a href="/{}/{}">{}</a>'.format(sec, s, l) + else: + return '<a href="/{}/{}/{}">{}</a>'.format(sec, s, l, l) + + def html(sec, f): c = read(f.path) s, l = slug(f.path) |