mirror of
https://github.com/welpo/tabi.git
synced 2025-10-11 07:46:15 +02:00
✨ feat(HTML): respect external_links_…
config (#126)
This commit is contained in:
parent
9c3e5d3990
commit
b73f7f5d93
5 changed files with 66 additions and 21 deletions
|
@ -1,6 +1,14 @@
|
|||
{% macro content(page) %}
|
||||
|
||||
{% set separator = config.extra.separator | default(value="•") %}
|
||||
{%- set separator = config.extra.separator | default(value="•") -%}
|
||||
|
||||
{%- set rel_attributes = macros_rel_attributes::rel_attributes() | trim -%}
|
||||
|
||||
{%- if config.markdown.external_links_target_blank -%}
|
||||
{%- set blank_target = "target=_blank" -%}
|
||||
{%- else -%}
|
||||
{%- set blank_target = "" -%}
|
||||
{%- endif -%}
|
||||
|
||||
<main>
|
||||
<article>
|
||||
|
@ -35,7 +43,7 @@
|
|||
{# Show link to remote changes if enabled #}
|
||||
{% set show_remote_changes = config.extra.show_remote_changes | default(value=true) %}
|
||||
{% if config.extra.remote_repository_url and show_remote_changes %}
|
||||
<li> {{ separator }} <a href="{{ macros_create_history_url::create_history_url(relative_path=page.relative_path) }}" target="_blank" rel="noopener noreferrer">{%- if lang != config.default_language -%}{{ trans(key="see_changes" | safe, lang=lang) }}{% else %}See changes{%- endif -%}<small> ↗</small></a></li>
|
||||
<li> {{ separator }} <a href="{{ macros_create_history_url::create_history_url(relative_path=page.relative_path) }}" {{ blank_target }} rel="{{ rel_attributes }}">{%- if lang != config.default_language -%}{{ trans(key="see_changes" | safe, lang=lang) }}{% else %}See changes{%- endif -%}<small> ↗</small></a></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue