🐛 fix(footer): fix external link redirection in footer (#219)
Co-authored-by: welpo <welpo@users.noreply.github.com>
This commit is contained in:
parent
7752bc38bf
commit
de91dfb0a7
@ -185,6 +185,7 @@ footer_menu = [
|
|||||||
{url = "about", name = "about", trailing_slash = true},
|
{url = "about", name = "about", trailing_slash = true},
|
||||||
# {url = "privacy", name = "privacy", trailing_slash = true},
|
# {url = "privacy", name = "privacy", trailing_slash = true},
|
||||||
{url = "sitemap.xml", name = "sitemap", trailing_slash = false},
|
{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.
|
# 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 = "about", name = "about", trailing_slash = true},
|
||||||
{url = "privacy", name = "privacy", trailing_slash = true},
|
{url = "privacy", name = "privacy", trailing_slash = true},
|
||||||
{url = "sitemap.xml", name = "sitemap", trailing_slash = false},
|
{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 = "about", name = "about", trailing_slash = true},
|
||||||
{url = "privacy", name = "privacy", trailing_slash = true},
|
{url = "privacy", name = "privacy", trailing_slash = true},
|
||||||
{url = "sitemap.xml", name = "sitemap", trailing_slash = false},
|
{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 = "about", name = "about", trailing_slash = true},
|
||||||
{url = "privacy", name = "privacy", trailing_slash = true},
|
{url = "privacy", name = "privacy", trailing_slash = true},
|
||||||
{url = "sitemap.xml", name = "sitemap", trailing_slash = false},
|
{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" -%}
|
{%- if menu.url == "sitemap.xml" -%}
|
||||||
{%- set url = get_url(path=menu.url, trailing_slash=trailing_slash) -%}
|
{%- 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 -%}
|
{%- else -%}
|
||||||
{%- set url = get_url(path=menu.url, lang=lang, trailing_slash=trailing_slash) -%}
|
{%- set url = get_url(path=menu.url, lang=lang, trailing_slash=trailing_slash) -%}
|
||||||
{%- endif -%}
|
{%- 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 = "about", name = "about", trailing_slash = true},
|
||||||
# {url = "privacy", name = "privacy", trailing_slash = true},
|
# {url = "privacy", name = "privacy", trailing_slash = true},
|
||||||
# {url = "sitemap.xml", name = "sitemap", trailing_slash = false},
|
# {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.
|
# Enable a copyright notice for the footer, shown between socials and the "Powered by" text.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user