mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-30 11:13:06 +00:00
7 lines
No EOL
302 B
Text
7 lines
No EOL
302 B
Text
{{- $subdir := strings.TrimSuffix (relLangURL "/") (relLangURL "") }}
|
|
{{- $url := .RelPermalink }}
|
|
{{- $url = replaceRE "/[^/]*$" "" $url }}
|
|
{{- $rel_url := strings.TrimPrefix $subdir $url }}
|
|
{{- $rel_url = replaceRE "/[^/]*" "/.." $rel_url }}
|
|
{{- $rel_url = trim $rel_url "/" }}
|
|
{{- return $rel_url }} |