I don’t have neither index.md, nor _index.md in tips subfolder because I don’t want page https://example.com/blog/tips to be created.
How can I get list of pages inside blog/tips directory to output it somewhere on the site as a list of links?
Is it possible to get list of folders (tips, tutorials …) to build an ordered list of links?
I could do it by using _index.md with order parameter for each section (tips, tutorials …), but as I mentioned I don’t want the pages like https://example.com/blog/tips to be created.
Maybe there is a more elegant solution to this requirement?
{{ range (readDir "content/blog/") }}
{{ if .IsDir }}
<p>{{ .Name | title }}</p>
<ul>
{{ $path := printf "blog/%s/" .Name }}
{{ range where (where $.Site.RegularPages "Type" "blog") "File.Dir" $path }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
{{ end }}
But I’m also beginning to question your content structure.
First, keep in mind that the structure of your site, from the perspective of visitors, does not need to match the structure of your content directory. See permalinks.
Second, the first level directory under the content directory determines a content’s type. In my view: