Skip to content

Commit

Permalink
Revert "base template: Fix multilingual extra //'s"
Browse files Browse the repository at this point in the history
Unfortunately this fix causes a new bug with sites hosted within a
directory of a domain (eg: justintennant.me/papaya) where the menu items
would be missing a "/" inbetween the base url and the menu item slug
(eg: justintennant.me/papayablog instead of
justintennant.me/papaya/blog).

I'm not sure what a clean solution is yet to both these problems so I'm
reverting for now.

This reverts commit 9da007e.
  • Loading branch information
justint committed Sep 14, 2022
1 parent adfd474 commit d6c47e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/base.html
Expand Up @@ -40,7 +40,7 @@ <h1 class="site-header">
<ul>
{% block nav_bar %}
{% for subsec in config.extra.menu_items %}
{% set link_url = subsec.url | replace(from="$BASE_URL", to=config.base_url) | replace(from="$LANG_BASE_URL/", to=base_url) %}
{% set link_url = subsec.url | replace(from="$BASE_URL", to=config.base_url) | replace(from="$LANG_BASE_URL", to=base_url) %}
<li><a {% if current_url and current_url is starting_with(link_url) %}class="active"{% endif %} href="{{ link_url }}">{{ trans(key=subsec.name, lang=lang) }}</a></li>
{% endfor %}
{% endblock nav_bar %}
Expand Down

0 comments on commit d6c47e7

Please sign in to comment.