Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-04-18Revert "Revert "Fix PostProcess regression for hugo server""Bjørn Erik Pedersen
This reverts commit 6c35a1a9eacf2aa86a11ecd31c4022ce330b2f16. Updates #9794
2022-04-17Revert "Fix PostProcess regression for hugo server"Bjørn Erik Pedersen
This reverts commit 4deb5c60661bdb1d686664f0207f45517a086f29.
2022-04-16Fix PostProcess regression for hugo serverBjørn Erik Pedersen
Fixes #9788
2022-04-08Rework the Destination filesystem to make --renderStaticToDisk workBjørn Erik Pedersen
See #9626
2022-03-21commands: Improve server startup to make tests less flakyBjørn Erik Pedersen
Do this by announcing/listen on the local address before we start the server.
2022-03-14Improve server startup/shutdownBjørn Erik Pedersen
Closes #9671
2022-03-14commands: Improve server testsBjørn Erik Pedersen
Updates #9647
2022-02-21commands: Fix server panic regressionBjørn Erik Pedersen
And now with a proper server test. Fixes #9518 Fixes #9530 Fixes #9539
2021-06-14Misc config loading fixesBjørn Erik Pedersen
The main motivation behind this is simplicity and correctnes, but the new small config library is also faster: ``` BenchmarkDefaultConfigProvider/Viper-16 252418 4546 ns/op 2720 B/op 30 allocs/op BenchmarkDefaultConfigProvider/Custom-16 450756 2651 ns/op 1008 B/op 6 allocs/op ``` Fixes #8633 Fixes #8618 Fixes #8630 Updates #8591 Closes #6680 Closes #5192
2020-12-03all: Format code with gofumptBjørn Erik Pedersen
See https://github.com/mvdan/gofumpt
2020-01-31commands: Fix config environment handlingBjørn Erik Pedersen
Fixes #6503 Fixes #6824
2019-08-12tests: Convert from testify to quicktestBjørn Erik Pedersen
2019-02-01commands: Add test for --configDirBjørn Erik Pedersen
See #5662
2019-01-08Use subtests with server_test.goAnton Harniakou
Use Golang's subtests to provide a convenient way to run specific tests. Example: go test -run=TestFixURL/Basic_production
2018-12-11Add /config dir supportBjørn Erik Pedersen
This commit adds support for a configuration directory (default `config`). The different pieces in this puzzle are: * A new `--environment` (or `-e`) flag. This can also be set with the `HUGO_ENVIRONMENT` OS environment variable. The value for `environment` defaults to `production` when running `hugo` and `development` when running `hugo server`. You can set it to any value you want (e.g. `hugo server -e "Sensible Environment"`), but as it is used to load configuration from the file system, the letter case may be important. You can get this value in your templates with `{{ hugo.Environment }}`. * A new `--configDir` flag (defaults to `config` below your project). This can also be set with `HUGO_CONFIGDIR` OS environment variable. If the `configDir` exists, the configuration files will be read and merged on top of each other from left to right; the right-most value will win on duplicates. Given the example tree below: If `environment` is `production`, the left-most `config.toml` would be the one directly below the project (this can now be omitted if you want), and then `_default/config.toml` and finally `production/config.toml`. And since these will be merged, you can just provide the environment specific configuration setting in you production config, e.g. `enableGitInfo = true`. The order within the directories will be lexical (`config.toml` and then `params.toml`). ```bash config ├── _default │   ├── config.toml │   ├── languages.toml │   ├── menus │   │   ├── menus.en.toml │   │   └── menus.zh.toml │   └── params.toml ├── development │   └── params.toml └── production ├── config.toml └── params.toml ``` Some configuration maps support the language code in the filename (e.g. `menus.en.toml`): `menus` (`menu` also works) and `params`. Also note that the only folders with "a meaning" in the above listing is the top level directories below `config`. The `menus` sub folder is just added for better organization. We use `TOML` in the example above, but Hugo also supports `JSON` and `YAML` as configuration formats. These can be mixed. Fixes #5422
2018-10-16commands: Show server error info in browserBjørn Erik Pedersen
The main item in this commit is showing of errors with a file context when running `hugo server`. This can be turned off: `hugo server --disableBrowserError` (can also be set in `config.toml`). But to get there, the error handling in Hugo needed a revision. There are some items left TODO for commits soon to follow, most notable errors in content and config files. Fixes #5284 Fixes #5290 See #5325 See #5324
2018-07-18commands: Disable flaky server tests on Windows CIBjørn Erik Pedersen
2018-07-18commands: Increase sleep in server teset to make it less shaky on WindowsBjørn Erik Pedersen
2018-04-13commands: Fix handling of persistent CLI flagsBjørn Erik Pedersen
See #4607
2018-04-12commands: Fix failing Travis server testBjørn Erik Pedersen
2018-04-11commands: Add basic server testBjørn Erik Pedersen
See #4598
2018-04-11commands: Fix TestFixURLBjørn Erik Pedersen
See #4598
2018-04-11commands: Make the server command non-globalBjørn Erik Pedersen
See #4598
2017-11-17Add multilingual multihost supportBjørn Erik Pedersen
This commit adds multihost support when more than one language is configured and `baseURL` is set per language. Updates #4027
2017-02-17all: Refactor to nonglobal Viper, i18n etc.Bjørn Erik Pedersen
This is a final rewrite that removes all the global state in Hugo, which also enables the use if `t.Parallel` in tests. Updates #2701 Fixes #3016
2016-10-24all: Unify case of config variable namesAlbert Nigmatzianov
All config variables starts with low-case and uses camelCase. If there is abbreviation at the beginning of the name, the whole abbreviation will be written in low-case. If there is abbreviation at the end of the name, the whole abbreviation will be written in upper-case. For example, rssURI.
2016-06-30commands: Allow schema-less baseURL on command lineCameron Moore
Fixes #1632
2016-02-06Unexport the remaining vars in hugo commandBjørn Erik Pedersen
2015-12-11Add copyright header to that source files that don’t have one.Anthony Fok
See #1646
2015-05-20Stop Viper from leaking across many of the tests (now tests pass regardless ↵spf13
of order tested)
2015-03-11Correct initialisms as suggested by golintAnthony Fok
First step to use initialisms that golint suggests, for example: Line 116: func GetHtmlRenderer should be GetHTMLRenderer as see on http://goreportcard.com/report/spf13/hugo Thanks to @bep for the idea! Note that command-line flags (cobra and pflag) as well as struct fields like .BaseUrl and .Url that are used in Go HTML templates need more work to maintain backward-compatibility, and thus are NOT yet dealt with in this commit. First step in fixing #959.
2015-03-06Fix errors reported by Go Vetbep
2015-01-16Update TestFixUrl() to expect BaseUrl to have trailing `/`Anthony Fok
See #793, #799
2015-01-02always use http scheme for localhostNathan Youngman
fixes #758
2014-10-08handle https prefixes in baseUrlMantas
2014-08-25Support subdir in baseurl.Nate Finch
Mainly this was a change to helpers.MakePermalink, but to get the local server to run correctly, we needed to redirect the path of the request from /foo to /. In addition, I added tests for the server's code for fixing up the base url with different config file & CLI options.