1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

28 Commits

Author SHA1 Message Date
7ae62f4aa3 Create hugo_stats.json if it's mounted but does not exists
A common pattern for Tailwind 3 is to mount that file to get it on the server watch list.

A common pattern is also to add hugo_stats.json to .gitignore.

This has meant that the first time you start the server (no hugo_stats.json), it just doesn't work as expected.

Fixes #11264
2023-07-19 19:50:37 +02:00
f1a061e9ed Re-instate disableLiveReload as a config option (and not just a flag)
Closes #11259
2023-07-19 19:50:37 +02:00
0f921ace6f Fix hugo mod vendor for modules with hugo.toml
Fixes #11221
2023-07-08 16:08:46 +02:00
80ecb95895 commands: Handle hugo mod get --help
Fixes #11141
2023-06-29 08:53:50 +02:00
793e38f5ce commands: Fix help message for hugo new theme
Closes #11161.
2023-06-28 09:30:27 +02:00
fa0e16f4c7 Fix false path warnings with resources.PostProcess
Fixes #7735
2023-06-27 21:55:35 +02:00
019299b0b0 commands: Enable format flag with hugo new site
Fixes #11155
2023-06-24 20:26:54 +02:00
12dc9a6e4a deploy: Fix deploy defaults for non-zero flag values (e.g. maxDeletes, invalidateCDN)
This was broken in the config rewrite in Hugo 0.112.0.

The workaround is to be explicit about setting these flag values (even if just using the defaults), e.g.:

```
hugo deploy --invalidateCDN --maxDeletes 256
```

Fixes #11127
2023-06-18 19:38:34 +02:00
0541a1b57d Fix handling of aliases (e.g. hugo serve)
Fixes #11090
2023-06-13 10:47:51 +02:00
cf38c73f53 commands: Add TLS/HTTPS support to hugo server
* commands: Add TLS/HTTPS support to hugo server

The "auto cert" handling in this PR is backed by mkcert (see link below).

To get this up and running on a new PC, you can:

```
hugo server trust
hugo server --tlsAuto
```

When `--tlsAuto` (or `--tlsCertFile` and `--tlsKeyFile`) is set and no `--baseURL` is provided as a flag, the server is
started with TLS and `https` as the protocol.

Note that you only need to run `hugo server trust` once per PC.

If you already have the key and the cert file (e.g. by using mkcert directly), you can do:

```
hugo server --tlsCertFile mycert.pem --tlsKeyFile mykey.pem
```

See https://github.com/FiloSottile/mkcert

Fixes #11064
2023-06-05 09:53:53 +02:00
a191b38ac8 Don't inject livereload script on hugo -w
Fixes #11061
2023-06-02 09:04:00 +02:00
fd099331ec Fix Processed images count regression for multiple languages
Fixes #11002
2023-05-28 12:55:44 +02:00
43f1282e73 commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod
Fixes #11018
2023-05-28 12:55:44 +02:00
e96cdfe966 Don't create the public folder unless needed
Fixes #11031
2023-05-28 12:55:44 +02:00
273d9f69a6 commands: Fail the build when no config file or config dir
Fixes #11019
2023-05-27 16:56:54 +02:00
8f293a1855 Fix --renderStaticToDisk regression
Fixes #11026
2023-05-27 16:56:54 +02:00
901cd970db commands: Re-introduce the -f shorthand for hugo new site
Fixes #11015
2023-05-27 16:56:54 +02:00
231374a1fa Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set
Fixes #11013
2023-05-24 16:39:31 +02:00
9a235d0afc Fix regression with site.IsServer when not running a server
Fixes #11006
2023-05-24 12:42:56 +02:00
85b13c105a Add --format to hugo config
Now default to TOML.
2023-05-22 20:26:02 +02:00
288be1976d Fix "unknown command" message when no suggestion
Updates #10953
2023-05-22 18:54:34 +02:00
6ca8a40f25 commands: Make all list commands list what 'all' did before
Also, always include the CSV header.

Updates #10953
2023-05-22 12:27:19 +02:00
e6dc8053bf commands: Fix build logic when listing expired/future draft content
Fixes #10972
2023-05-21 10:16:25 +02:00
d6197a41fa Re-add --printUnusedTemplates and --printPathWarnings
And now with tests.

Updates #10953
2023-05-19 11:37:05 +02:00
3f00f47535 commands: Load config before creating the filesystem
To allow publishDir to be set in config file.
2023-05-18 15:38:25 +02:00
8a69ccbb00 commands: Improve the common build flag handling
Updates #10947
2023-05-17 22:13:29 +02:00
5251f015bf Re-establish all the server flags
Updates #10947
2023-05-17 22:13:29 +02:00
241b21b0fd Create a struct with all of Hugo's config options
Primary motivation is documentation, but it will also hopefully simplify the code.

Also,

* Lower case the default output format names; this is in line with the custom ones (map keys) and how
it's treated all the places. This avoids doing `stringds.EqualFold` everywhere.

Closes #10896
Closes #10620
2023-05-16 18:01:29 +02:00