Skip to content
Snippets Groups Projects
Verified Commit 4a54201d authored by Jake's avatar Jake
Browse files

added link.render_tag() macro

parent ab426695
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,15 @@
{%- endcall -%}
{%- endmacro -%}
{%- macro render_tag(tag, lang) -%}
{%- set url = ['tag',tag]|join(':') -%}
{%- call(parsedurl, anchor, reflang, is_external, reftype, refid, refpage, tagcattitle, tagcatcolor) parse_url(url, lang) -%}
{%- set attr = {"classes": ["tag-link"], "style": {"--category-color": tagcatcolor}} -%}
{{ render(url,None,lang,attr=attr,title=tag) }}
{%- endcall -%}
{%- endmacro -%}
{#- returns: (url, anchor, reflang, is_external, reftype, refid, refpage, tagcattitle, tagcatcolor)-#}
{%- macro parse_url(rawurl, lang) -%}
......
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