mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 14:18:01 +08:00
alias: fix redirect URLs in case of empty BaseURL #562
This commit is contained in:
parent
e3ac6efd7c
commit
35a4fd83ef
@ -1,7 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{- $url := replace (replace .Permalink site.BaseURL "/") "//" "/" }}
|
||||
{{- $url := .Permalink }}
|
||||
{{- if site.BaseURL }}
|
||||
{{- $url = replace .Permalink site.BaseURL "/" }}
|
||||
{{- end }}
|
||||
{{- $url = replace $url "//" "/" }}
|
||||
{{- with site.Home.GetPage $url }}
|
||||
{{- $c := "" }}{{/* if defaultContentLanguageInSubdir=false we are ending here for home page of the default language */}}
|
||||
{{- $url = partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user