fix(templates): strip base_url from nav hrefs and unescape image src URLs
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@
|
||||
{% set top = get_section(path="_index.md") %}
|
||||
{% for p in top.subsections %}
|
||||
{% set sub = get_section(path=p) %}
|
||||
<li><a href="{{ sub.permalink }}">{{ sub.title }}</a></li>
|
||||
<li><a href="{{ sub.permalink | replace(from=config.base_url, to='') | safe }}">{{ sub.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{%- set source_path = "static/images/" ~ src -%}
|
||||
{%- set resized = resize_image(path=source_path, width=width, op="fit_width", quality=85) -%}
|
||||
<img
|
||||
src="{{ resized.url }}"
|
||||
src="{{ resized.url | safe }}"
|
||||
width="{{ resized.width }}"
|
||||
height="{{ resized.height }}"
|
||||
alt="{{ alt }}"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<ul class="col-sm-{{ col_width | round }}">
|
||||
<li class="dropdown-header">{{ child.title }}</li>
|
||||
{%- for cpage in child.pages -%}
|
||||
<li><a href="{{ cpage.permalink }}">{{ cpage.title }}</a></li>
|
||||
<li><a href="{{ cpage.permalink | replace(from=config.base_url, to='') | safe }}">{{ cpage.title }}</a></li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
</li>
|
||||
@@ -44,7 +44,7 @@
|
||||
</li>
|
||||
{%- else -%}
|
||||
<li class="{% if current_url and current_url is starting_with(sub.permalink) %}active{% endif %}">
|
||||
<a href="{{ sub.permalink }}">{{ sub.title }}</a>
|
||||
<a href="{{ sub.permalink | replace(from=config.base_url, to='') | safe }}">{{ sub.title }}</a>
|
||||
</li>
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
|
||||
Reference in New Issue
Block a user