~andreicek


Better layouting for Hugo

~/blog% tree layouts/                                                    
layouts/
|-- _default
|   |-- baseof.html
|   `-- single.html
|-- index.html
`-- rss.xml

1 directory, 4 files

And then baseof.html is:

<!DOCTYPE html>
<html lang="en">
<body>

{{ block "main" . }}{{ end }}

</body>
</html>

main is then used in single.html and index.html:

{{ define "main" }}
<main>
</main>
{{ end }}

Go back to homepage