hugo/docs/content/en/functions/path/Base.md
2025-04-10 13:04:51 +02:00

493 B

title description categories keywords params aliases
path.Base Replaces path separators with slashes (`/`) and returns the last element of the given path.
functions_and_methods
aliases returnType signatures
string
path.Base PATH
/functions/path.base
{{ path.Base "a/news.html" }} → news.html
{{ path.Base "news.html" }} → news.html
{{ path.Base "a/b/c" }} → c
{{ path.Base "/x/y/z/" }} → z
{{ path.Base "" }} → .