working on path normalizer

This commit is contained in:
Daniel Fichtinger 2025-04-05 17:57:15 -04:00
parent 59ead0f26a
commit bdd9e63fdf
3 changed files with 32 additions and 1 deletions

View file

@ -59,7 +59,12 @@ func buildPageData(m Metadata, in string, out string, settings *Settings) *PageD
p.Title = util.PathToTitle(in)
}
if icon, ok := m["icon"].(string); ok {
p.Icon = icon
i, err := util.NormalizePath(icon)
if err != nil {
p.Icon = settings.IconName
} else {
p.Icon = i
}
} else {
p.Icon = settings.IconName
}