hugo/commands
Bjørn Erik Pedersen 422057f607 create: Use archetype template as-is as a Go template
This commit removes the fragile front matter decoding, and takes the provided archetype file as-is and processes it as a template.

This also means that we no longer will attempt to fill in default values for `title` and `date`.

The upside is that it is now easy to create these values in a dynamic way:

```toml
+++
title = {{ .BaseFileName | title }}
date = {{ .Date }}
draft = true
+++
```

You can currently use all of Hugo's template funcs, but the data context is currently very shallow:

* `.Type` gives the archetype kind provided
* `.Name` gives the target file name without extension.
* `.Path` gives the target file name
* `.Date` gives the current time as RFC3339 formatted string

The above  will probably be extended in #1629.

Fixes #452
Updates #1629
2017-06-18 19:06:28 +02:00
..
benchmark.go
check.go
commandeer.go
convert.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
env.go
gen.go
genautocomplete.go
gendoc.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
gendocshelper.go commands: Adjust docs path 2017-06-14 10:37:58 +02:00
genman.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
hugo.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
hugo_windows.go
import_jekyll.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
import_jekyll_test.go
limit_darwin.go
limit_others.go
list.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
list_config.go
new.go create: Use archetype template as-is as a Go template 2017-06-18 19:06:28 +02:00
new_test.go
release.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
server.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
server_test.go
undraft.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00
undraft_test.go
version.go Run gofmt to get imports in line vs gohugoio/hugo 2017-06-13 19:12:10 +02:00