Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/EmielH/tale-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Hollander <EmielH@users.noreply.github.com>2018-10-16 20:04:35 +0300
committerEmiel Hollander <EmielH@users.noreply.github.com>2018-10-16 20:04:35 +0300
commitebb14fb8e4737db4afcebad1f2f6ea4d4e1a3c1e (patch)
treee273a3657745854133771669864a9426e39be1dd
parent40647ffb41c2b6ddcdb01a10d1c827fb415abb35 (diff)
Add partials for single post header and footer
-rw-r--r--README.md9
-rw-r--r--layouts/_default/single.html5
-rw-r--r--layouts/partials/single/footer.html5
-rw-r--r--layouts/partials/single/header.html9
-rw-r--r--layouts/partials/single/title.html2
5 files changed, 26 insertions, 4 deletions
diff --git a/README.md b/README.md
index cf33ec9..151546b 100644
--- a/README.md
+++ b/README.md
@@ -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