I have a .baseof.html
like this below
<!doctype html>
<html lang="en">
{{ partial "head.html" . }}
<body>
{{ partial "nav.html" . }}
<div class="columns">
<div class="column is-one-fifth">
{{ partial "menu.html" . }}
</div>
<div class="column">
<div class="content">
{{ block "main" . }}{{ end }}
</div>
</div>
</div>
</body>
</html>
there will be 2 side, 1 side for menu which is a sidebar vertical menu and 1 for the content
my menu.html
<aside class="menu">
<p><a href="/projects" class="menu-label"> Projects </a></p>
<ul class="menu-list">
{{ with .Site.GetPage "projects" }}
{{ range .Pages }}
<li>{{ .Title }} </li>
{{ end }}
{{ end }}
</ul>
</aside>
what i want in menu is show category name from content
folder and it’s contents. For example above i want to show that i have menu projects
and i want to show articles i wrote from it but just title
and i manage to show it
this is my content dir look like
|-archetypes
| |-default.md
|-content
| |-writings
| | |-index.html
| | |-if-by-rudyard-kipling.md
| | |-dick.md
| | |-kilmer.md
| |-projects
| | |-if-by-rudyard-kipling.md
| | |-_index.md
the _index.md
have no content. but if i do not have it, it will not show the list in menu.html
but the problem is, when i click Project menu from sidebar, i lost my list in sidebar. the title if-by-rudyard-kipling
not show
My questions are
- how do i keep the list show up even though i change the page? for example above when i in root page, the list showed up, but when click on project page, the list is gone
- how to show url of each page in menu? because it currently just title, and not clickable
kindly need your guys help, i am just new to use hugo. thanks