Browse Source

Fix relative URL handling for posts

master
Paweł Romanowski 6 years ago
parent
commit
4623287652
  1. 2
      README.md
  2. 2
      templates/macros/menu.html

2
README.md

@ -7,7 +7,7 @@
Live demo here: https://pawroman.github.io/zola-theme-terminimal/
Fork (not a port) of "Terminal" Hugo theme
This theme is a fork (not a port) of "Terminal" Hugo theme
by Radosław Kozieł (aka. panr):
https://github.com/panr/hugo-theme-terminal

2
templates/macros/menu.html

@ -17,7 +17,7 @@
{% endfor -%}
{%- for item in menu_items %}
{%- set blog_post = not current_item and item.url == "/" -%}
{%- set blog_post = not current_item and item.url == "$BASE_URL" -%}
<li {%- if current_item and item == current_item or blog_post %} class="active" {%- endif %}>
{%- if item.newtab -%}
<a href="{{ item.url | replace(from="$BASE_URL", to=config.base_url) | safe }}" target="_blank" rel="noopener noreferrer">{{ item.name | safe }}</a>

Loading…
Cancel
Save