diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-06-23 12:49:10 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-06-25 15:48:02 +0200 |
commit | e1317dd32281dc5ce670e34165dc7780c8f5892b (patch) | |
tree | 986f45feec6d2590b859697f7498f7f9a3cdcc1e /config | |
parent | eddcd2bac6bfd3cc0ac1a3b38bf8c4ae452ea23b (diff) | |
download | hugo-e1317dd32281dc5ce670e34165dc7780c8f5892b.tar.gz hugo-e1317dd32281dc5ce670e34165dc7780c8f5892b.zip |
Add css.TailwindCSS
Closes #12618
Closes #12620
Diffstat (limited to 'config')
-rw-r--r-- | config/allconfig/load.go | 2 | ||||
-rw-r--r-- | config/security/securityConfig.go | 1 | ||||
-rw-r--r-- | config/security/securityConfig_test.go | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/config/allconfig/load.go b/config/allconfig/load.go index 117b8e89c..84419cb2e 100644 --- a/config/allconfig/load.go +++ b/config/allconfig/load.go @@ -467,7 +467,7 @@ func (l *configLoader) loadModules(configs *Configs) (modules.ModulesConfig, *mo ignoreVendor, _ = hglob.GetGlob(hglob.NormalizePath(s)) } - ex := hexec.New(conf.Security) + ex := hexec.New(conf.Security, workingDir) hook := func(m *modules.ModulesConfig) error { for _, tc := range m.AllModules { diff --git a/config/security/securityConfig.go b/config/security/securityConfig.go index be9e901f1..46a5d0a23 100644 --- a/config/security/securityConfig.go +++ b/config/security/securityConfig.go @@ -39,6 +39,7 @@ var DefaultConfig = Config{ "^go$", // for Go Modules "^npx$", // used by all Node tools (Babel, PostCSS). "^postcss$", + "^tailwindcss$", ), // These have been tested to work with Hugo's external programs // on Windows, Linux and MacOS. diff --git a/config/security/securityConfig_test.go b/config/security/securityConfig_test.go index 57e615a48..87a243012 100644 --- a/config/security/securityConfig_test.go +++ b/config/security/securityConfig_test.go @@ -135,7 +135,7 @@ func TestToTOML(t *testing.T) { got := DefaultConfig.ToTOML() c.Assert(got, qt.Equals, - "[security]\n enableInlineShortcodes = false\n\n [security.exec]\n allow = ['^(dart-)?sass(-embedded)?$', '^go$', '^npx$', '^postcss$']\n osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE)$']\n\n [security.funcs]\n getenv = ['^HUGO_', '^CI$']\n\n [security.http]\n methods = ['(?i)GET|POST']\n urls = ['.*']", + "[security]\n enableInlineShortcodes = false\n\n [security.exec]\n allow = ['^(dart-)?sass(-embedded)?$', '^go$', '^npx$', '^postcss$', '^tailwindcss$']\n osEnv = ['(?i)^((HTTPS?|NO)_PROXY|PATH(EXT)?|APPDATA|TE?MP|TERM|GO\\w+|(XDG_CONFIG_)?HOME|USERPROFILE|SSH_AUTH_SOCK|DISPLAY|LANG|SYSTEMDRIVE)$']\n\n [security.funcs]\n getenv = ['^HUGO_', '^CI$']\n\n [security.http]\n methods = ['(?i)GET|POST']\n urls = ['.*']", ) } |