Hi,
My directory structure is the following:
└── content
├── technical_note
├── python
| ├── post-1.md
| ├── post-2.md
├── linux
├── post-1.md
├── post-2.md
I would like to have a page that lists the content of my subdirectory technical_note
and hyperlinks to the corresponding pages similar to the following:
Python
- Post 1
- Post 2
Linux
- Post 1
- Post 2
I have the following piece of code in themes/acedemic/layouts/summary_page/single.html
:
<h4 class="card-header">Python</h4>
<div class="card-body">
<ul>
{{ $section := site.GetPage "/technical_note/python" }}
{{ with $section }}
{{ range .Pages }}
<li><a href="{{.Permalink}}">{{.Title}}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
<h4 class="card-header">Linux</h4>
<div class="card-body">
<ul>
{{ $section := site.GetPage "/technical_note/linux" }}
{{ with $section }}
{{ range .Pages }}
<li><a href="{{.Permalink}}">{{.Title}}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
I created a file named index.html
in technical_note
containing
---
title: "TEST technical layout"
authors: ["me"]
date: 2020-04-08T22:44:12+02:00
description: "Layout test"
draft: false
type: summary_page
---
Nothing appears in the website. I would appreciate any help with this. The repository is located in: https://github.com/othrif/notes