summaryrefslogtreecommitdiffstats
path: root/commands/new_site.go
AgeCommit message (Collapse)Author
2023-01-16Make hugo.toml the new config.tomlBjørn Erik Pedersen
Both will of course work, but hugo.toml will win if both are set. We should have done this a long time ago, of course, but the reason I'm picking this up now is that my VS Code setup by default picks up some JSON config schema from some random other software which also names its config files config.toml. Fixes #8979
2022-11-21commands: Create assets directory with new siteJoe Mooring
Closes #10460
2022-05-06Improve error messages, esp. when the server is runningBjørn Erik Pedersen
* Add file context to minifier errors when publishing * Misc fixes (see issues) * Allow custom server error template in layouts/server/error.html To get to this, this commit also cleans up and simplifies the code surrounding errors and files. This also removes the usage of `github.com/pkg/errors`, mostly because of https://github.com/pkg/errors/issues/223 -- but also because most of this is now built-in to Go. Fixes #9852 Fixes #9857 Fixes #9863
2022-04-08Rework the Destination filesystem to make --renderStaticToDisk workBjørn Erik Pedersen
See #9626
2022-01-07commands: Fix CLI help text for hugo newBjørn Erik Pedersen
Updates #9363
2021-10-16Reimplement archetypesBjørn Erik Pedersen
The old implementation had some issues, mostly related to the context (e.g. name, file paths) passed to the template. This new implementation is using the exact same code path for evaluating the pages as in a regular build. This also makes it more robust and easier to reason about in a multilingual setup. Now, if you are explicit about the target path, Hugo will now always pick the correct mount and language: ```bash hugo new content/en/posts/my-first-post.md ``` Fixes #9032 Fixes #7589 Fixes #9043 Fixes #9046 Fixes #9047
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-11-11commands: Add hint when dir not emptyreuben honigwachs
Many users seem to stumble over creating new sites in existing non-empty directories. And that `--force` is the necessary option. So I added *See --force* as a hint to the error. Fixes #4825.
2019-06-19commands: Remove comma after URL in new site outputJoshua Arnott
Some terminals include the comma in the URL when hyperlinking, resulting in a 404
2018-10-22Convert the rest to new page parser code pathsBjørn Erik Pedersen
And remove some now unused code. See #5324
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-10-16Revert "commands: Add .gitignore "hugo new site""Bjørn Erik Pedersen
This fails on Windows, so it needs to be reconsidered. This reverts commit 92979d92889ff8991acfadd42982c2e55d01b163.
2018-10-16commands: Add .gitignore "hugo new site"Nathaniel Peiffer
2018-06-11commands: Move nextStepsText() to new_site.goAnthony Fok
2018-04-11commands: Make the hugo command non-globalBjørn Erik Pedersen
See #4598
2018-04-11commands: Make the new commands non-globalBjørn Erik Pedersen
See #4598