Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'resources/page/page_paths.go')
-rw-r--r--resources/page/page_paths.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/resources/page/page_paths.go b/resources/page/page_paths.go
index 160c225b1..89616d421 100644
--- a/resources/page/page_paths.go
+++ b/resources/page/page_paths.go
@@ -124,6 +124,11 @@ func CreateTargetPaths(d TargetPathDescriptor) (tp TargetPaths) {
}
+ if d.URL != "" && !strings.HasPrefix(d.URL, "/") {
+ // Treat this as a context relative URL
+ d.ForcePrefix = true
+ }
+
pagePath := slash
var (