How to get the current url in Hugo
New Course Coming Soon:
Get Really Good at Git
{{ trim .Page.RelPermalink "/"}}
This is the result:
yoursite.com/ebooks -> "ebooks"
yoursite.com/ebooks/php -> "ebooks/php"
→ Get my Go Handbook
Here is how can I help you:
- COURSES where I teach everything I know
- CODING BOOTCAMP cohort course - next edition in 2025
- BOOKS 16 coding ebooks you can download for free on JS Python C PHP and lots more
- Follow me on X