Fix theme name extraction from URL

This commit is contained in:
Igor Baiborodine authored and Bjørn Erik Pedersen committed 2022-06-07 15:28:47 +02:00
1 parent f1a492c079
commit a544519d37
1 file changed
+2 -1
+2 -1
View File
@@ -169,7 +169,8 @@ func (c *buildClient) writeThemesContent() error {
}
func (c *buildClient) writeThemeContent(k string, m client.Module) error {
themeName := strings.ToLower(path.Base(k))
re := regexp.MustCompile(`\/v\d+$`)
themeName := strings.ToLower(path.Base(re.ReplaceAllString(k, "")))
themeDir := filepath.Join(c.contentDir, "themes", themeName)
client.CheckErr(os.MkdirAll(themeDir, 0777))