mirror of
https://github.com/yusing/godoxy.git
synced 2025-06-09 13:02:33 +02:00
replace - _ with whitespace for default homepage.name
This commit is contained in:
parent
e6b4630ce9
commit
4f09dbf044
2 changed files with 8 additions and 3 deletions
|
@ -59,7 +59,12 @@ func (cfg *Config) HomepageConfig() H.HomePageConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
if item.Name == "" {
|
if item.Name == "" {
|
||||||
item.Name = U.Title(alias)
|
item.Name = U.Title(
|
||||||
|
strings.ReplaceAll(
|
||||||
|
strings.ReplaceAll(alias, "-", " "),
|
||||||
|
"_", " ",
|
||||||
|
),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.GetType() == PR.ProviderTypeDocker {
|
if p.GetType() == PR.ProviderTypeDocker {
|
||||||
|
|
|
@ -10,10 +10,10 @@ type (
|
||||||
Icon string `yaml:"icon" json:"icon"`
|
Icon string `yaml:"icon" json:"icon"`
|
||||||
URL string `yaml:"url" json:"url"` // URL or unicodes
|
URL string `yaml:"url" json:"url"` // URL or unicodes
|
||||||
Category string `yaml:"category" json:"category"`
|
Category string `yaml:"category" json:"category"`
|
||||||
SourceType string `yaml:"source_type" json:"source_type"`
|
|
||||||
Description string `yaml:"description" json:"description"`
|
Description string `yaml:"description" json:"description"`
|
||||||
WidgetConfig map[string]any `yaml:",flow" json:"widget_config"`
|
WidgetConfig map[string]any `yaml:",flow" json:"widget_config"`
|
||||||
|
|
||||||
|
SourceType string `yaml:"-" json:"source_type"`
|
||||||
Initialized bool `yaml:"-" json:"-"`
|
Initialized bool `yaml:"-" json:"-"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Reference in a new issue