From a544519d3729ca9f75fc7c096087af7d5d588cd2 Mon Sep 17 00:00:00 2001 From: Igor Baiborodine Date: Tue, 7 Jun 2022 08:29:01 -0400 Subject: [PATCH] Fix theme name extraction from URL --- pkg/buildcmd/build.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/buildcmd/build.go b/pkg/buildcmd/build.go index 369cb81..209986f 100644 --- a/pkg/buildcmd/build.go +++ b/pkg/buildcmd/build.go @@ -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))