So, I’m trying to build part of a navigation bar such that each section of a page’s URL is a link. For example, if my page is at {base}/a/b/c
, I want to generate links {base}
, {base}/a
, {base}/a/b
and {base}/a/b/c
. How can I generate these links using range
and the page’s relURL
? I’ve looked into path.Base
, path.Split
and path.Dir
, but I’m not sure how to combine these to get what I want or if I can even do it using them. Any help would be appreciated.
1 Like