summaryrefslogtreecommitdiffstats
path: root/create
AgeCommit message (Collapse)Author
2017-03-24create: Delete redundant viper callsAlbert Nigmatzianov
Also make easier to read the code
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-15Use OS fs by defaultBjørn Erik Pedersen
Fixes #3032
2017-02-04all: Refactor to nonglobal file systemsBjørn Erik Pedersen
Updates #2701 Fixes #2951
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
2016-12-15create: Allow empty dates in archetype in newBjørn Erik Pedersen
To make it behave the same as Hugo 0.17.
2016-11-30create: Run all the test variants in TestNewContentBjørn Erik Pedersen
See #2750
2016-11-29create: Simplify archetype logicBjørn Erik Pedersen
See ##2750
2016-11-29create: Fix archetype title and date handlingBjørn Erik Pedersen
Fixes #2750
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-04-10create: Add package docBjørn Erik Pedersen
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-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-16Use absolute path when editing with editorJohn Ku
Fixes #1589
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-11-23Change the license to Apache 2.0Steve Francia
2015-03-05Apply gofmt -sbep
2015-02-08parser.FormatSanitize() MetaDataFormat for date tooAnthony Fok
So that the date would come out correctly with variations like `MetaDataFormat = "YAML"` in addition to the normally expected `MetaDataFormat = "yaml"`. Fixes #865.
2015-01-24Handle empty front matter in archetype.Jonathan Anderson
If an archetype has deliberately empty front matter (e.g., to suppress generation of the 'draft' field or to force a particular front matter type instead of the default TOML), we should handle it gracefully rather than panic ("assignment to entry in nil map").
2014-12-12Trigger an editor after `hugo new`.Austin Ziegler
- Trigger permanently with NewContentEditor in config.{toml,yaml,json}. - Trigger on an individual basis with --editor.
2014-11-13change path usage to filepathJoel Scoble
2014-11-13Added better error message for poorly formed frontmatters in archtypesBrian Payne
2014-11-01Migrating Hugo to Afero for filesystem calls.spf13
2014-10-16Big refactor of how source files are used. Also added default destination ↵spf13
extension option.
2014-10-15Copy content from archetypebep
Prior to this commit only metadata were copied from archetype on content creation. This commit includes the content if set in archetype. This is useful in situations with similar page structure. Fixes #556
2014-08-19fix issue 411, /path/to/site/archetypes : is a directory errorJoel Scoble
2014-08-18added evaluation for toml for metadataformat date handlingJoel Scoble
2014-05-29Updating Convert to handle dates properly for yaml and jsonspf13
Fix bug with YAML & JSON with handling dates with 'new' and 'convert'
2014-05-02Adding the new command and the create packagespf13