diff options
author | Emiel Hollander <EmielH@users.noreply.github.com> | 2018-10-21 22:08:17 +0300 |
---|---|---|
committer | Emiel Hollander <EmielH@users.noreply.github.com> | 2018-10-21 22:08:17 +0300 |
commit | e50ae3922946c7facf3597a4348aa7fdda655b4f (patch) | |
tree | b32d6f19c6762ffd97f91d9632d4439e9a1b63d3 | |
parent | ffc436900bc174126845ad5fe632d151e16a0ff6 (diff) |
Add partial for introduction on index page
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | layouts/index.html | 2 | ||||
-rw-r--r-- | layouts/partials/index/introduction.html | 5 |
3 files changed, 11 insertions, 0 deletions
@@ -81,6 +81,10 @@ The theme contains placeholder partials to make the theme more flexible and easi These are included in the template for a single post, at the top of the post (below the title) and at the bottom of the post, respectively. These can be used, for example, to include additional information about the post author or for related posts. Create a file `/layouts/partials/single/header.html` or `footer.html` on your own site to have it included. +- `index/introduction.html` + +This partial is included at the top of the list of posts on the index page, allowing you to add an introduction to your site. + ## Acknowledgments Thanks diff --git a/layouts/index.html b/layouts/index.html index 5918367..8b4b147 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,6 +1,8 @@ {{ define "main" }} <main> + {{ partial "index/introduction.html" . }} + <div class="catalogue"> {{ range (.Paginate .Pages).Pages }} {{ .Render "summary" }} diff --git a/layouts/partials/index/introduction.html b/layouts/partials/index/introduction.html new file mode 100644 index 0000000..5b636b8 --- /dev/null +++ b/layouts/partials/index/introduction.html @@ -0,0 +1,5 @@ +<!-- +This is a placeholder partial for the introduction. Create a file called +layouts/partials/index/introduction.html in your own site to overwrite this +placeholder. +--> |