fix breadcrumb

This commit is contained in:
chrislu
2024-07-03 17:40:55 -07:00
parent 7ee1f520a4
commit 7c06306857
2 changed files with 77 additions and 0 deletions

View File

@@ -13,6 +13,9 @@ type Breadcrumb struct {
func ToBreadcrumb(fullpath string) (crumbs []Breadcrumb) {
parts := strings.Split(fullpath, "/")
if fullpath == "/" {
parts = []string{""}
}
for i := 0; i < len(parts); i++ {
name := parts[i]