🐛 fix(footer): fix external link redirection in footer (#219)

Co-authored-by: welpo <welpo@users.noreply.github.com>
main
Joberth Rogers 1 year ago committed by GitHub
parent 7752bc38bf
commit de91dfb0a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -185,6 +185,7 @@ footer_menu = [
{url = "about", name = "about", trailing_slash = true},
# {url = "privacy", name = "privacy", trailing_slash = true},
{url = "sitemap.xml", name = "sitemap", trailing_slash = false},
# {url = "https://example.com", name = "external link", trailing_slash = true},
]
# Enable a copyright notice for the footer, shown between socials and the "Powered by" text.

@ -534,6 +534,7 @@ footer_menu = [
{url = "about", name = "about", trailing_slash = true},
{url = "privacy", name = "privacy", trailing_slash = true},
{url = "sitemap.xml", name = "sitemap", trailing_slash = false},
{url = "https://example.com", name = "external link", trailing_slash = true},
]
```

@ -532,6 +532,7 @@ footer_menu = [
{url = "about", name = "about", trailing_slash = true},
{url = "privacy", name = "privacy", trailing_slash = true},
{url = "sitemap.xml", name = "sitemap", trailing_slash = false},
{url = "https://example.com", name = "external link", trailing_slash = true},
]
```

@ -536,6 +536,7 @@ footer_menu = [
{url = "about", name = "about", trailing_slash = true},
{url = "privacy", name = "privacy", trailing_slash = true},
{url = "sitemap.xml", name = "sitemap", trailing_slash = false},
{url = "https://example.com", name = "external link", trailing_slash = true},
]
```

@ -70,6 +70,12 @@
{%- if menu.url == "sitemap.xml" -%}
{%- set url = get_url(path=menu.url, trailing_slash=trailing_slash) -%}
{%- elif menu.url is starting_with("http") -%}
{%- if menu.trailing_slash -%}
{%- set url = menu.url ~ "/" -%}
{%- else -%}
{%- set url = menu.url -%}
{%- endif -%}
{%- else -%}
{%- set url = get_url(path=menu.url, lang=lang, trailing_slash=trailing_slash) -%}
{%- endif -%}

@ -164,6 +164,7 @@ encode_plaintext_email = true # Setting is ignored if email is already encoded.
# {url = "about", name = "about", trailing_slash = true},
# {url = "privacy", name = "privacy", trailing_slash = true},
# {url = "sitemap.xml", name = "sitemap", trailing_slash = false},
# {url = "https://example.com", name = "external link", trailing_slash = true},
# ]
# Enable a copyright notice for the footer, shown between socials and the "Powered by" text.

Loading…
Cancel
Save