List sub-folders

Here is the file structure:

content/
|___writeups/
       |___topic1/
       |      |_ index.md
       |
       |___topic2/
       |       |_ index.md
       |
       |_ index.md

Now, I want to provide like a menu to the subfolders topic1, topic2 from the writeups, but I also want to have an introduction in the writeups page too. I noticed that hugo automatically generated links to these subfolders but I was not able to add any extra content.
I am new to hugo and I need help.

I don’t know what this means. To which page do you wish to add “extra” content"?

Which theme are you using?

Sorry for the confusion. I want to add some content in the /writeups page, basically an introduction, followed by the links to the sub folders.

When i add links in writeups/index.md as follows:

Some text here ...

- [Topic1](topic1/)
- [Topic2](topic2/)

But when I click on them I get a 404. Despite the folder content/writeups/topic(1,2) having an index.md file.

And i am using hugo-ficurinia

Add content to content/writeups/_index.md.

When i do that hugo seems to ignore it and justs shows the links to the subfolders. Ill try again though

You are more likely to receive a prompt and accurate response if you post a link to your project’s Git repository.

See Requesting Help.

Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.

I havent yet pushed to github. Give me a minute

mv content/writeups/index.md content/writeups/_index.md
mkdir -p layouts/_default
cp themes/hugo-ficurinia/layouts/_default/list.html layouts/_default/

The last line overrides the theme’s template.

Then edit layouts/_default/list.html:

layouts/_default/list.html
{{ define "main" }}
    {{ .Content }}
    {{ if in (site.Params.extraContentDirs | default (slice)) .Section }}
        <h1>{{ .Section | humanize }}</h1>
        {{- partial "home_post_list.html" (dict "Ctx" . "AllPostsList" .Pages) -}}
    {{ else }}
        {{- partial "simple_posts_list.html" . -}}
    {{ end }}
{{ end }}

Great. That seemed to work! Could you explain what changed by using _index.md and how it automatically lists the subfolders?
Also do i need to do the same in order to list other pages? Not subfolders this time

https://gohugo.io/troubleshooting/faq/#what-is-the-difference-between-an-indexmd-file-and-an-_indexmd-file

I will give it a read thanks. About listing individual pages?
For example:

topic1/
|___ page1
|___ page2
Etc.

What’s your question?

Mentioned it in a previous reply. What do I need to do to list individual pages in a similar nature.

Sorry, I still don’t understand your question. Your existing content structure looks fine:

content/
├── about/
│   └── index.md
├── posts/
│   ├── learning.md
│   └── quantum_nature_of_the_board.md
└── writeups/
    ├── pico/
    │   └── index.md
    ├── tryhackme/
    │   └── index.md
    └── _index.md

Let me try to rephrase. The pico and tryhackme folders will contain multiple pages in the near future. I want their index.md to pose as a navigation page. The writeups will include taxonomies like difficulty/category/os. Is there a way to make index.md list these pages by thejr taxonomies?
Something like:
Category:
BinExp:
Crypto:
Forensics

OS:
Windows
Linux
Other
Etc.

If you want a directory to be a section (i.e., multiple pages) it either needs to be a top level directory, or it must contain an _index.md file (with an underscore).

A directory must not contain both an index.md file and an _index.md file.

So just like you did with the writeups directory, you’ll you need to rename some files:

mv content/writeups/pico/index.md content/writeups/pico/_index.md
mv content/writeups/tryhackme/index.md content/writeups/tryhackme/_index.md

Sure. That’s an advanced topic. Please update your repository with sample content that has terms assigned, and we can look at it again.

Alright. I will give you a mention when its done

Hey there! I spent some time reading and I came up with the following shortcode which seems to do exactly what I want! I did not expect it to be relatively easy to make.
Are there any improvements I can make whatsoever? Thanks in advance!

<!-- layouts/shortcodes/taxonomy-list.html -->
{{ $taxonomies := .Get "taxonomies" | default "" }}
{{ $taxonomyList := split $taxonomies "," }}

{{ if gt (len $taxonomyList) 0 }}
    {{ range $taxonomyList }}
        {{ $taxonomy := . }}
        <h2>{{ $taxonomy | title }}</h2>
        {{ range $term, $taxonomyPages := index $.Site.Taxonomies $taxonomy }}
            <h3>{{ $term }}</h3>
            <ul>
                {{ range $taxonomyPages.Pages }}
                    <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
                {{ end }}
            </ul>
        {{ end }}
    {{ end }}
{{ else }}
    {{ range $taxonomyName, $terms := $.Site.Taxonomies }}
        <h2>{{ $taxonomyName | title }}</h2>
        {{ range $term, $taxonomyPages := $terms }}
            <h3>{{ $term }}</h3>
            <ul>
                {{ range $taxonomyPages.Pages }}
                    <li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
                {{ end }}
            </ul>
        {{ end }}
    {{ end }}
{{ end }}