mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-27 09:30:47 +00:00
ac78d25240
Enclose `{{ .Content }}` with a `{{ if .IsPage }}` test to avoid the "Content is not a field of struct type *hugolib.Node" error. Thanks to @spf13 for the tip! Fixes #366. Also update example to Hugo v0.12 conventions: - Convert config.yaml to config.toml to follow what `hugo new site /path/to/site` generates - Rename layouts/chrome to layouts/partials - Convert `template` calls to `partial` calls - Add .gitignore to ignore the `public` directory - Add README.md with pointers to discussions in issues to help bring newcomers up to speed with this multilingual example
15 lines
468 B
HTML
15 lines
468 B
HTML
{{ partial "head.html" . }}
|
|
{{ partial "header.html" . }}
|
|
{{ range .Site.Indexes.groups.uudised.Pages }}
|
|
<article class="post">
|
|
<header>
|
|
<h2><a href='{{ .Permalink }}'>{{ .Title }}</a> </h2>
|
|
<div class="post-meta">{{ .Date.Format "Mon, Jan 2, 2006" }} - {{ .FuzzyWordCount }} sõna</div>
|
|
</header>
|
|
{{ .Summary }}
|
|
<footer>
|
|
<a href='{{ .Permalink }}'><nobr>Loe rohkem →</nobr></a>
|
|
</footer>
|
|
</article>
|
|
{{ end }}
|
|
{{ partial "footer.html" . }}
|