From a010ebf822a4d04974219bc38fcec19d9d08490e Mon Sep 17 00:00:00 2001
From: Manish Lad <manishlad@users.noreply.github.com>
Date: Mon, 08 Mar 2021 15:29:04 +0000
Subject: [PATCH] Ability to show full post content on home page (#144)

---
 layouts/index.html |    2 +-
 README.md          |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/README.md b/README.md
index 4e99075..fdd3ce7 100644
--- a/README.md
+++ b/README.md
@@ -148,6 +148,13 @@
 ```
 Put any content into the `_index.md` file located in the content directory. If you want, you can also have some static text and the posts below. In such case, simply keep the `mainSections = ["post"]` and put any static content in the `_index.md`.
 
+### Show full post content on the home page
+If you prefer the full content of your posts to appear on the home page rather than a summary of each post, then set the parameter `fullPostContent` to `true`.
+```toml
+[params]
+fullPostContent = true
+```
+
 ### Multilingual support
 
 Anatole supports multilingual page setups. All you need to do is to add the languages to your 'config.toml'. For each Language you can set the custom options like title or description. It's important to include a `LanguageName`, as it will be displayed in the main menu.
diff --git a/layouts/index.html b/layouts/index.html
index 36b5ed5..62f7e91 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -26,7 +26,7 @@
                 </h3>
             </div>
             <div class="post-content">
-                <div class="p_part"><p>{{ .Summary }}</p></div>
+                <div class="p_part"><p>{{ if .Site.Params.fullPostContent }}{{ .Content }}{{ else }}{{ .Summary }}{{ end }}</p></div>
             </div>
             <div class="post-footer">
                 <div class="meta">

--
Gitblit v1.10.0