[gimp-web-devel/pat/bootstrap] Add frontmatter option to ignore sub pages



commit b1d281ebc3121a5f33c9fac7e7fd4ba38053210f
Author: Pat David <patdavid gmail com>
Date:   Tue Sep 6 13:39:07 2022 -0500

    Add frontmatter option to ignore sub pages
    
    On section pages, which act like list pages, Jehan didn't want
    to see a listing of sub-pages on the branch (he wanted to do it
    manually).
    
    This commit sets a frontmatter option to suppress the list
    generation in the section template by setting frontmatter:
    
    ```
    show_sub: {true|false}
    ```

 content/core_developers/setup/build/_index.md | 1 +
 layouts/_default/section.html                 | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/content/core_developers/setup/build/_index.md b/content/core_developers/setup/build/_index.md
index 659f871..09a6073 100644
--- a/content/core_developers/setup/build/_index.md
+++ b/content/core_developers/setup/build/_index.md
@@ -3,6 +3,7 @@ title: "Building GIMP"
 Author: "GIMP team"
 Date: 2021-06-20
 weight: 2
+show_subs: false
 ---
 
 This page describes how to build GIMP.
diff --git a/layouts/_default/section.html b/layouts/_default/section.html
index fc69ddd..cc59439 100644
--- a/layouts/_default/section.html
+++ b/layouts/_default/section.html
@@ -6,6 +6,8 @@
 
     {{ .Content }}
 
+
+    {{ if eq .Params.show_subs true }}
     <ul>
       {{ range .Data.Pages }}
       <li>
@@ -23,8 +25,11 @@
 
       </li>
       {{ end }}
-
     </ul>
+    {{ end }}
+
+
+
   </section>
 </div>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]