path.BaseName
Returns the last element of the given path with its extension removed, if present, after replacing path separators with slashes (
/).- Syntax
- path.BaseName PATH
- Returns
- string
{{ path.BaseName "a/news.html" }} → news
{{ path.BaseName "news.html" }} → news
{{ path.BaseName "a/b/c" }} → c
{{ path.BaseName "/x/y/z/" }} → z
{{ path.BaseName "" }} → .Last updated:
September 11, 2026
:
content: Comply with function/method description guidance in style guide (76fa3fc9e)
Improve this page