diff options
author | Emiel Hollander <EmielH@users.noreply.github.com> | 2018-10-16 20:04:35 +0300 |
---|---|---|
committer | Emiel Hollander <EmielH@users.noreply.github.com> | 2018-10-16 20:04:35 +0300 |
commit | ebb14fb8e4737db4afcebad1f2f6ea4d4e1a3c1e (patch) | |
tree | e273a3657745854133771669864a9426e39be1dd | |
parent | 40647ffb41c2b6ddcdb01a10d1c827fb415abb35 (diff) |
Add partials for single post header and footer
-rw-r--r-- | README.md | 9 | ||||
-rw-r--r-- | layouts/_default/single.html | 5 | ||||
-rw-r--r-- | layouts/partials/single/footer.html | 5 | ||||
-rw-r--r-- | layouts/partials/single/header.html | 9 | ||||
-rw-r--r-- | layouts/partials/single/title.html | 2 |
5 files changed, 26 insertions, 4 deletions
@@ -72,6 +72,15 @@ Tale allows for writing the summary of your posts manually by setting the `summa Tale has basic support for taxonomies. Taxonomy and terms pages will be generated when you have defined taxonomies, but you need to include links to these pages yourself. For example, you can add a link to a taxonomy page in `header-menu.html`. +### Placeholder partials + +The theme contains placeholder partials to make the theme more flexible and easier to adapt to your site without having to change the theme itself. These are: + +- `single/header.html` +- `single/footer.html` + +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. + ## Acknowledgments Thanks diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7c6592a..f705d3c 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,9 +2,14 @@ <main> <div class="post"> + {{ partial "single/post-info.html" . }} + {{ partial "single/title.html" . }} + {{ partial "single/header.html" . }} {{ .Content }} + + {{ partial "single/footer.html" . }} </div> <div class="pagination"> diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html new file mode 100644 index 0000000..8a115ba --- /dev/null +++ b/layouts/partials/single/footer.html @@ -0,0 +1,5 @@ +<!-- +This is a placeholder partial for the post footer. Create a file called +layouts/partials/single/footer.html in your own site to overwrite this +placeholder. +-->
\ No newline at end of file diff --git a/layouts/partials/single/header.html b/layouts/partials/single/header.html index 0bfd8ac..6724ec9 100644 --- a/layouts/partials/single/header.html +++ b/layouts/partials/single/header.html @@ -1,4 +1,5 @@ -{{ partial "single/post-info.html" . }} - -<h1 class="post-title">{{ .Title }}</h1> -<div class="post-line"></div>
\ No newline at end of file +<!-- +This is a placeholder partial for the post header. Create a file called +layouts/partials/single/header.html in your own site to overwrite this +placeholder. +-->
\ No newline at end of file diff --git a/layouts/partials/single/title.html b/layouts/partials/single/title.html new file mode 100644 index 0000000..bbd93aa --- /dev/null +++ b/layouts/partials/single/title.html @@ -0,0 +1,2 @@ +<h1 class="post-title">{{ .Title }}</h1> +<div class="post-line"></div>
\ No newline at end of file |