Closed fmaida closed 1 month ago
I suspect you are including the root key within your security.toml file.
See docs: https://gohugo.io/getting-started/configuration/#omit-the-root-key
I suspect you are including the root key within your security.toml file.
I already tried to include and exclude the "[security]" header from the security.toml
file but it doesn't seems to make any difference on my computer.
This is a support issue, not a bug. Please create a topic in the forum and we'll handle it from there. Thanks.
Sorry, I am an idiot. I correctly removed the [security] header but forgot to rename [security.exec] to [exec]. You can close this, sorry again.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I have a blog that hosts its configuration not in a
config.toml
file, but inside aconfig/_default
folder. I had to add directives to manage security, but if I add them as asecurity.toml
file insideconfig/_default
, they don't seem to be recognized by Hugo. However, if I insert them into theconfig/_default/config.toml
file, they do work.What I did
I was in the terminal, inside my home directory. I tried to create a new post on my Hugo website and edit it with my editor of choice (Helix), so I wrote:
Hugo gave me this error message, claiming that the command 'hx' is not whitelisted:
So as prompted I wrote a small portion of code to tackle the security problem:
Here my problems begins...
My Hugo blog does not have a
config.toml
file in the root. Instead, I opted for a "Config directory approach", because it seems more clear to me. So my project root looks like this:Inside the
config
directory I have a subfolder named "_default":I tried to create a
security.toml
file insideconfig/_default
, but Hugo seems to ignore it. In order to get it working I had to add the security configuration part to config.tomlI'm not sure if this is a bug or not
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes