mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
This commit is contained in:
@@ -1,21 +1,16 @@
|
||||
---
|
||||
title: urls.RelLangURL
|
||||
linkTitle: relLangURL
|
||||
description: Returns a relative URL with a language prefix, if any.
|
||||
categories: [functions]
|
||||
categories: []
|
||||
keywords: []
|
||||
menu:
|
||||
docs:
|
||||
parent: functions
|
||||
function:
|
||||
action:
|
||||
aliases: [relLangURL]
|
||||
returnType: template.HTML
|
||||
related:
|
||||
- functions/urls/AbsLangURL
|
||||
- functions/urls/AbsURL
|
||||
- functions/urls/RelURL
|
||||
returnType: string
|
||||
signatures: [urls.RelLangURL INPUT]
|
||||
relatedFunctions:
|
||||
- urls.AbsLangURL
|
||||
- urls.AbsURL
|
||||
- urls.RelLangURL
|
||||
- urls.RelURL
|
||||
aliases: [/functions/rellangurl]
|
||||
---
|
||||
|
||||
@@ -37,7 +32,7 @@ With `baseURL = https://example.org/`
|
||||
{{ relLangURL "" }} → /en/
|
||||
{{ relLangURL "articles" }} → /en/articles
|
||||
{{ relLangURL "style.css" }} → /en/style.css
|
||||
```
|
||||
```
|
||||
|
||||
With `baseURL = https://example.org/docs/`
|
||||
|
||||
@@ -57,7 +52,7 @@ With `baseURL = https://example.org/`
|
||||
{{ relLangURL "/" }} → /en/
|
||||
{{ relLangURL "/articles" }} → /en/articles
|
||||
{{ relLangURL "/style.css" }} → /en/style.css
|
||||
```
|
||||
```
|
||||
|
||||
With `baseURL = https://example.org/docs/`
|
||||
|
||||
|
Reference in New Issue
Block a user