mirror of
https://github.com/tiennm99/hugoThemesSiteBuilder.git
synced 2026-10-19 08:15:17 +00:00
Fix theme name extraction from URL
This commit is contained in:
1 parent
f1a492c079
commit
a544519d37
1 file changed
+2
-1
@@ -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))
|
||||
|
||||
Reference in new issue
Block a user