mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
683 B
683 B
title, description, categories, menu, keywords, signature, relatedfuncs
title | description | categories | menu | keywords | signature | relatedfuncs | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
path.Clean | Replaces path separators with slashes (`/`) and removes extraneous separators. |
|
|
|
|
|
path.Clean
replaces path separators with slashes (/
) and removes extraneous separators, including trailing separators.
{{ path.Clean "foo//bar" }} → "foo/bar"
{{ path.Clean "/foo/bar/" }} → "/foo/bar"
On a Windows system, if .File.Path
is foo\bar.md
, then:
{{ path.Clean .File.Path }} → "foo/bar.md"