Commit Graph

23 Commits

Author SHA1 Message Date
Bjørn Erik Pedersen c8aa8617f1 Move config/_default/config.toml -> config.toml
I will do a new rename in a minute, but my take on this now is that:

* Every site should have a hugo.toml (or yaml,json) file.
* In most simple setups, I would limit the use of the /config folder to environment specific things.
2023-01-17 12:09:45 +01:00
Joe Mooring 3a22ee7d6e Remove translations
The english content remains in content/en.
2022-12-30 14:45:10 +01:00
Bjørn Erik Pedersen 1de2bc5a90 config: Update to ga v4 2022-12-20 17:03:25 +01:00
Joe Mooring 7b4c517a6c Fix docs menu weights 2022-11-10 21:52:35 -08:00
Joe Mooring 1b12916340 Promote "Installation" to a section
Closes #1866
Closes #1227
Closes #1468
Closes #1472
Closes #1555
Closes #1626
Closes #1737
Closes #1841
2022-11-10 15:15:02 +01:00
Joe Mooring 672042f898 Consolidate site configuration
Merged settings from config.toml in project root into
config/_default/config.toml.

Closes #1596
2022-11-07 11:56:14 +01:00
Christian Oliff dac034f63a Markdown and formatting fixes (#1850) 2022-10-20 16:05:43 +09:00
Bjørn Erik Pedersen dbf9514fd6 Update security.toml
Add BRANCH to env whitelist.
2021-12-17 13:22:58 +01:00
Bjørn Erik Pedersen 68554cf77c Add some basic security policies with sensible defaults
This ommmit contains some security hardening measures for the Hugo build runtime.

There are some rarely used features in Hugo that would be good to have disabled by default. One example would be the "external helpers".

For `asciidoctor` and some others we use Go's `os/exec` package to start a new process.

These are a predefined set of binary names, all loaded from `PATH` and with a predefined set of arguments. Still, if you don't use `asciidoctor` in your project, you might as well have it turned off.

You can configure your own in the new `security` configuration section, but the defaults are configured to create a minimal amount of site breakage. And if that do happen, you will get clear instructions in the loa about what to do.

The default configuration is listed below. Note that almost all of these options are regular expression _whitelists_ (a string or a slice); the value `none` will block all.

```toml
[security]
  enableInlineShortcodes = false
  [security.exec]
    allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$']
    osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM)$']

  [security.funcs]
    getenv = ['^HUGO_']

  [security.http]
    methods = ['(?i)GET|POST']
    urls = ['.*']
```
2021-12-16 09:40:22 +01:00
Bjørn Erik Pedersen 4eb10c1a96 Set a sensible maxAge on the image cache 2021-12-12 15:18:21 +01:00
Bjørn Erik Pedersen 648598090e Configure image cache to use :cacheDir/images
That should make the Netlify builds faster, now that we don't store the images in Git anymore.
2021-12-11 15:45:23 +01:00
Bjørn Erik Pedersen 36a9e701ca docs: Adjust config docs 2021-08-03 12:22:02 +02:00
Bjørn Erik Pedersen bdaf7e0228 Release 0.81.0 2021-02-19 19:29:56 +01:00
Bjørn Erik Pedersen 9be494de3a Clean up the markup config 2020-05-31 12:41:38 +02:00
Bjørn Erik Pedersen c486747de6 Params cleanup 2020-01-23 16:12:24 +01:00
Bjørn Erik Pedersen ded74f0982 Add Goldmark as the new default markdown handler
This commit adds the fast and CommonMark compliant Goldmark as the new default markdown handler in Hugo.

If you want to continue using BlackFriday as the default for md/markdown extensions, you can use this configuration:

```toml
[markup]
defaultMarkdownHandler="blackfriday"
```

Fixes #5963
Fixes #1778
Fixes #6355
2019-11-23 14:12:24 +01:00
bmackinney 38a15e6f7d remove metaDataFormat from config.toml
and replace reference to the config in templates/introduction.md
2019-09-07 19:53:22 +02:00
Bjørn Erik Pedersen b294048e9b Make it a Hugo Module 2019-07-29 10:12:14 +02:00
Bjørn Erik Pedersen 3fdb45b3cd docs: Add Hugo Modules docs 2019-07-25 13:21:30 +02:00
Bjørn Erik Pedersen af82c56c51 config: Remove superflous param 2019-03-21 09:13:16 +01:00
Shohei Ueda 00e4402605 Remove extra whitespace 2019-02-20 15:07:08 +01:00
Bjørn Erik Pedersen 6a2684fe4f Add the default cache configuration
So we can use it for testing.
2019-02-01 09:56:34 +01:00
Bjørn Erik Pedersen 320a0ac681 Refactor config below /config
See https://github.com/gohugoio/hugo/issues/5422
2018-12-24 08:36:16 +01:00