hugo/commands
Bjørn Erik Pedersen 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
..
commandeer.go commands: Add TLS/HTTPS support to hugo server 2023-06-05 09:53:53 +02:00
commands.go commands: Improve the common build flag handling 2023-05-17 22:13:29 +02:00
config.go commands: Add --lang to hugo config 2023-06-01 10:49:21 +02:00
convert.go commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod 2023-05-28 12:55:44 +02:00
deploy.go commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod 2023-05-28 12:55:44 +02:00
deploy_off.go commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod 2023-05-28 12:55:44 +02:00
env.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
gen.go commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod 2023-05-28 12:55:44 +02:00
helpers.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
hugo_windows.go Create a struct with all of Hugo's config options 2023-05-16 18:01:29 +02:00
hugobuilder.go commands: Fail the build when no config file or config dir 2023-05-27 16:56:54 +02:00
import.go commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod 2023-05-28 12:55:44 +02:00
list.go commands: Make all list commands list what 'all' did before 2023-05-22 12:27:19 +02:00
mod.go commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod 2023-05-28 12:55:44 +02:00
new.go releaser: Prepare repository for 0.113.0-DEV 2023-06-02 07:19:22 +00:00
release.go commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod 2023-05-28 12:55:44 +02:00
server.go commands: Add TLS/HTTPS support to hugo server 2023-06-05 09:53:53 +02:00
xcommand_template.go commands: Reinstate some of the removed build flags (e.g. --theme) to new and mod 2023-05-28 12:55:44 +02:00