Update default archetype

Update the default archetype to specify all relevant frontmatter fields.
Updated the bigimg and comments features to handle "unset" or "null"
values in the frontmatter and default appropriately. Also updated the
bigimg sample to explain both the default and "flow" YAML syntax.
This commit is contained in:
Michael Romero 2017-03-07 02:53:09 -08:00
commit ba07f7cc67
7 changed files with 32 additions and 19 deletions

View file

@ -1,11 +1,10 @@
{{ if or .Params.bigimg .Title }}
{{ if .Params.bigimg }}
{{ if isset .Params.bigimg 1 }}
<div id="header-big-imgs" data-num-img={{len .Params.bigimg}} {{range $i, $img := .Params.bigimg}}data-img-src-{{add $i 1}}="{{$img.src}}" {{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}{{end}}></div>
{{ end }}
<header class="header-section {{ if .Params.bigimg }}has-img{{ end }}">
<div class="intro-header {{ if .Params.bigimg }}big-img{{ else }}no-img{{ end }}">
<header class="header-section {{ if isset .Params.bigimg 1 }}has-img{{ end }}">
<div class="intro-header {{ if isset .Params.bigimg 1 }}big-img{{ else }}no-img{{ end }}">
{{ partial "header.html" . }}
<span class="img-desc" style="display: inline;"></span>
</div>