Posts not being listed with custom directory

#1

Hello,

I have been trying to make a new content folder under /content/blog but the list.html page does not list the posts, even tho they are rended by Hugo.

The default /content/posts works correctly.

/content/post working:

/content/blog failing to list posts:

#2

Please read Requesting Help and follow the advice.

The reason is, we need to see code to figure it out. You need to mention the theme you are using, and link to your site’s repo if possible.

It is likely the list.html doesn’t support any section, rather it renders specifically for posts. But who knows? :slight_smile:

#3

The theme is a modified “blank” one

list.html:

{{ partial "header.html" . }}
	<main>
<section class="section has-background-dark has-text-white">

<div class="columns">

<div class="column content is-two-thirds">
<center><h1 class="title has-text-white">Blog Category Page</h1></center>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    
	
{{ partial "summary.html" . }}
		{{ partial "pagination.html" . }}
</div>
</div>
</div>
        
</div>    
    
<div class="column">

<div class="box">
<p class="content">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<a class="button is-fullwidth is-link">Random Button 4 U</a>
</div>
    
</div>    
    
</div>
    
</section>
	</main>

{{ partial "footer.html" . }}

summary.html:

<div class="box has-background-black">
<div class="columns">

<div class="column has-text-white">
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
		{{ range $paginator.Pages }}
<article>

		<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
		<time>{{ .Date.Format "02.01.2006 15:04" }}</time>
		{{ range .Params.tags }}
		<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
		{{ end }}
		<div>
			{{ .Summary }}
			
			
			{{ if .Truncated }}
				<a href="{{ .Permalink }}">Read more...</a>
				
			{{ end }}
		</div>
		&nbsp;
	</article>
	{{ end }}