summaryrefslogtreecommitdiffstats
path: root/commands/new.go
AgeCommit message (Collapse)Author
2017-06-13all: Update import paths to gohugoio/hugoBjørn Erik Pedersen
2017-06-13Revert "releaser: Bump versions for release of 0.22.1"Bjørn Erik Pedersen
This reverts commit dce70fb7c5845ec5e410e4bf97c862d38cfec9a5.
2017-06-13releaser: Prepare repository for 0.23-DEVBjørn Erik Pedersen
2017-06-13releaser: Prepare repository for 0.22.1-DEVBjørn Erik Pedersen
[ci skip]
2017-06-13releaser: Bump versions for release of 0.22.1Bjørn Erik Pedersen
[ci skip]
2017-06-12releaser: Bump versions for release of 0.22Bjørn Erik Pedersen
[ci skip]
2017-06-03all: Temporarily revert to BurntSushi for TOML front matter handlingBjørn Erik Pedersen
We still have go-toml as a transitive dependency, and it is the way to go eventually, but we care about speed, so let us wait that one out. Note that the issue this fixes is about taxonomies, but I guess this is a general issue for sites with many pages that uses TOML as front matter. ``` benchmark old ns/op new ns/op delta BenchmarkFrontmatterTags/TOML:1-4 23206 8543 -63.19% BenchmarkFrontmatterTags/TOML:11-4 80117 18495 -76.92% BenchmarkFrontmatterTags/TOML:21-4 140676 28727 -79.58% benchmark old allocs new allocs delta BenchmarkFrontmatterTags/TOML:1-4 173 60 -65.32% BenchmarkFrontmatterTags/TOML:11-4 625 138 -77.92% BenchmarkFrontmatterTags/TOML:21-4 1106 210 -81.01% benchmark old bytes new bytes delta BenchmarkFrontmatterTags/TOML:1-4 9231 2912 -68.45% BenchmarkFrontmatterTags/TOML:11-4 19808 5184 -73.83% BenchmarkFrontmatterTags/TOML:21-4 31200 7536 -75.85% ``` See #3541 Updates #3464
2017-05-24cmd: Replace flagChanged with pflag.FlagSet.ChangedAlbert Nigmatzianov
2017-05-22releaser: Bump versions for release of 0.21Bjørn Erik Pedersen
[ci skip]
2017-04-26commands: Make first letter of flags' usage lowercaseAlbert Nigmatzianov
2017-04-10all: Prepare Hugo 0.20 release versionv0.20Bjørn Erik Pedersen
2017-03-27all: Propagate baseURL error to the callersBjørn Erik Pedersen
2017-03-24commands: Fix case of createpath in new.goAlbert Nigmatzianov
2017-03-11parser: Refactor frontmatter parser and add testsCameron Moore
Lots of cleanups here: - Refactor InterfaceToConfig and InterfaceToFrontMatter to use io.Writer. - Simplify InterfaceToFrontMatter by wrapping InterfaceToConfig. - Export FrontmatterType since we return it in DetectFrontMatter. - Refactor removeTOMLIdentifier to avoid blindly replacing "+++". - Update HandleJSONMetaData to return an empty map on nil input. - Updates vendored goorgeous package and test for org-mode frontmatter. - Add tests and godoc comments. Coverage for parser package increased from 45.2% to 85.2%.
2017-03-01Handle Hugo version strings with patch levelBjørn Erik Pedersen
Fixes #3025
2017-02-27Update versions to 0.19 releaseBjørn Erik Pedersen
2017-02-21commands: Remove flagChanged from commandeerbogem
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
2017-02-04all: Refactor to nonglobal file systemsBjørn Erik Pedersen
Updates #2701 Fixes #2951
2017-01-20cmd: Remove empty tags/features strings in theme.toml templatedigitalcraftsman
2017-01-07all: Refactor to non-global loggerBjørn Erik Pedersen
Note that this looks like overkill for just the logger, and that is correct, but this will make sense once we start with the template handling etc. Updates #2701
2017-01-02commands: Fix case in default config variablebogem
2016-12-19Bump to 0.18 release versionBjørn Erik Pedersen
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-10-14Use example.org for replace-this-with-your-hugo-site.comBjørn Erik Pedersen
Fixes #2575
2016-10-09command: Fix hugo new for multiple architecturesChase Adams
Changes `%q` to `%s`. `%q` was safely escaping the `\` in windows so that it was printing `\\`. Uses `filepath.Join` for example filepath so that the output is OS specific and since this required splitting up the multiline string, it's refactored into a separate function.. Fixes #2401
2016-10-07commands: Bump min_version to 0.17 for "new theme" subcommandAnthony Fok
2016-09-26commands: Revise instructions after "hugo new site"Anthony Fok
mainly to fit inside 80-column wide terminal windows. See #1164
2016-08-20Switch to a more up to date TOML libraryBjørn Erik Pedersen
Fixes #2089
2016-04-08commands: Add helpful instuctions after "hugo new site"digitalcraftsman
Fixes #1164
2016-03-31Add readFile template funcBjørn Erik Pedersen
This also includes a refactor of the hugofs package and its usage. The motivation for that is: The Afero filesystems are brilliant. Hugo's way of adding a dozen of global variables for the different filesystems was a mistake. In readFile (and also in some other places in Hugo today) we need a way to restrict the access inside the working dir. We could use ioutil.ReadFile and implement the path checking, checking the base path and the dots ("..") etc. But it is obviously better to use an Afero BasePathFs combined witha ReadOnlyFs. We could create a use-once-filesystem and handle the initialization ourselves, but since this is also useful to others and the initialization depends on some other global state (which would mean to create a new file system on every invocation), we might as well do it properly and encapsulate the predefined set of filesystems. This change also leads the way, if needed, to encapsulate the file systems in a struct, making it possible to have several file system sets in action at once (parallel multilanguage site building? With Moore's law and all...) Fixes #1551
2016-03-20create: Refactor NewContent to be testableCameron Moore
NewContent is refactored to use the afero.Fs interface that should allow full testing. This commit also pulls the metadata creation logic out of NewContent and into a separate function to decrease the cyclomatic complexity of NewContent.
2016-03-14commands: Remove unused codeBjørn Erik Pedersen
2016-02-05Unexport the remaining vars in hugo commandBjørn Erik Pedersen
2016-02-05Clean flagsBjørn Erik Pedersen
* Reduce the amount of global flags * Unexport all flag vars and commands vars * Some other minor flag cleaning
2016-01-01Add themesDir option to configurationdigitalcraftsman
themesDir can be used to change the default path of the themes folder. Fixes 1556
2015-12-16Improve some random feedback messagesAnthony Fok
Also clean up a couple random comments.
2015-12-16Add `--source` flag back to `hugo new` commandAnthony Fok
v0.15 had it, but I removed it inadvertently for 0.16-DEV in commit 00d04774 in PR #1652. Also add directory bash-completion for `--source` for `hugo convert`, `hugo list` and `hugo new`. See #1624, #1589
2015-12-08Fix some of the "new site" testsSteve Francia
2015-12-07Fix copyright headers in source filesBjørn Erik Pedersen
Still need to add some missing headers and an AUTHORS file. See #1646
2015-12-04Added 'themes' as a default new site directoryinondle
Fixes #1507
2015-12-02Some more error fixes in commandsBjørn Erik Pedersen
See #1502
2015-12-02Improve error handling in commandsBjørn Erik Pedersen
Cobra, the CLI commander in use in Hugo, has some long awaited improvements in the error handling department. This enables a more centralized error handling approach. This commit introduces that by changing all the command funcs to `RunE`: * The core part of the error logging, usage logging and `os.Exit(-1)` is now performed in one place and that one place only. * The usage text is now only shown on invalid arguments etc. (user errors) Fixes #1502
2015-12-01Bump min_version to 0.15 for `hugo new theme`Anthony Fok
2015-11-23Change the license to Apache 2.0Steve Francia
2015-10-17Show usage when new site creation failsBjørn Erik Pedersen
2015-10-17Improve error message on new site commandBjørn Erik Pedersen
2015-10-17Add force flagSafonov Nikita
If flag is passed the site will be created inside non-empty folder only if there are no existent folders or config with the same name hugo creates. Resolves: #1163
2015-10-15Create minimal default.md in archetype fileAndy Williams
fixes #315 To fix the cast error, create a minimal default.md in the archetype folder.
2015-09-08Add a 404.html file if a new theme is createddigitalcraftsman