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
path: root/create
AgeCommit message (Collapse)Author
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-21create: 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-17Improve 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-24Change the license to Apache 2.0Steve Francia
2015-03-06Apply 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-14change 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-17Big 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-20fix issue 411, /path/to/site/archetypes : is a directory errorJoel Scoble
2014-08-18added evaluation for toml for metadataformat date handlingJoel Scoble
2014-05-30Updating 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