added predefined homepage categories

This commit is contained in:
yusing
2024-11-03 11:44:30 +08:00
parent 01b7ec2a99
commit d89d97b61f
2 changed files with 76 additions and 0 deletions

View File

@@ -69,6 +69,18 @@ func HomepageConfig() homepage.Config {
)
}
if en.Container != nil && item.Category == "" {
if category, ok := homepage.PredefinedCategories[en.Container.ImageName]; ok {
item.Category = category
}
}
if item.Category == "" {
if category, ok := homepage.PredefinedCategories[strings.ToLower(alias)]; ok {
item.Category = category
}
}
switch {
case entry.IsDocker(r):
if item.Category == "" {