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
path: root/docs
diff options
context:
space:
mode:
authorJoe Mooring <joe.mooring@veriphor.com>2021-10-09 21:36:57 +0300
committerGitHub <noreply@github.com>2021-10-09 21:36:57 +0300
commitf8d132d731cf8e27c8c17931597fd975e8a7c3cc (patch)
treed7e1ac73601d17d6bda01434e455ec9608d40276 /docs
parent26f1919ae0cf57d754bb029270c20e76cc32cf4d (diff)
docs: Create path.Clean documentation
Related to #9005
Diffstat (limited to 'docs')
-rw-r--r--docs/content/en/functions/path.Clean.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/content/en/functions/path.Clean.md b/docs/content/en/functions/path.Clean.md
new file mode 100644
index 000000000..03ffbd836
--- /dev/null
+++ b/docs/content/en/functions/path.Clean.md
@@ -0,0 +1,26 @@
+---
+title: path.Clean
+description: Replaces path separators with slashes (`/`) and removes extraneous separators.
+date: 2021-10-08
+# publishdate: 2018-11-28
+# lastmod: 2018-11-28
+categories: [functions]
+menu:
+ docs:
+ parent: "functions"
+keywords: [path]
+signature: ["path.Clean PATH"]
+---
+
+`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"
+```