mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
422057f607
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 |
||
---|---|---|
.. | ||
benchmark.go | ||
check.go | ||
commandeer.go | ||
convert.go | ||
env.go | ||
gen.go | ||
genautocomplete.go | ||
gendoc.go | ||
gendocshelper.go | ||
genman.go | ||
hugo.go | ||
hugo_windows.go | ||
import_jekyll.go | ||
import_jekyll_test.go | ||
limit_darwin.go | ||
limit_others.go | ||
list.go | ||
list_config.go | ||
new.go | ||
new_test.go | ||
release.go | ||
server.go | ||
server_test.go | ||
undraft.go | ||
undraft_test.go | ||
version.go |