Fix: link the top-left logo to logo_home_link

This fix works by adding missing two missing `.extra`'s when accessing the `logo_home_link` in the `header` template block.

The bug is caused by the first missing `.extra`, which makes Tera assume that `logo_home_link` variable doesn't exist, so the `if` trigger for using it never fires. This means that the logo will always link to the default value of `base_url`.

The second missing `.extra` comes after the `if` fires. It's used to set the value of `logo_link` to `logo_home_link`.
This commit is contained in:
Brooke 2023-05-11 14:27:27 -07:00 committed by GitHub
parent 9347dda144
commit d7f9e84041
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,8 +29,8 @@
<header class="header">
<div class="header__inner">
<div class="header__logo">
{%- if config.logo_home_link %}
{% set logo_link = config.logo_home_link %}
{%- if config.extra.logo_home_link %}
{% set logo_link = config.extra.logo_home_link %}
{% else %}
{% set logo_link = config.base_url %}
{% endif -%}