[SOLVED] section list template not rendered (live reload maybe problem?)


#1
/layouts/section/<SECTION>.html
/layouts/<SECTION>/list.html
/layouts/_default/section.html
/layouts/_default/list.html
/themes/<THEME>/layouts/section/<SECTION>.html
/themes/<THEME>/layouts/<SECTION>/list.html
/themes/<THEME>/layouts/_default/section.html
/themes/<THEME>/layouts/_default/list.html

I have site.com/authors which is in /content/authors/

Where do you put the list page for this section?

Say for example I have /content/authors/author-name/some_article.md

I want to be able to go to site.com/authors/ and get a list page of all the authors on the site.

I can’t seem to figure out this cryptic documentation.

How to name the actual files on disk?

/layouts/section/<SECTION>.html - /layouts/section/author.html or authors.html
/layouts/<SECTION>/list.html - /layouts/author/list.html or /layout/authors/list.html
/layouts/_default/section.html - /layouts/_deault/author.html or section.html?

I have tried all variations and I can’t seem to get a list template rendered for site.com/authors

Please help.


#2

SECTION is the name of the folder directly under /content. When you specify ‘type’ in the front matter, you are overriding the section.


#3

If I make a file called /layouts/section/authors.html

and put some sample text in it, it will not be rendered at site.com/authors/ - it does not generate anything.

how do I generate an index.html for site.com/authors/


#4

I think the problem is live reload. When I kill hugo and start to serve again, it seems to render.


#5

I was using the correct locations, but it seems that hugo needs to die and restart the serve before ti takes effect.

Does it happen only for me or anyone else?

Could there be an issue in live reload, or some caveats I am unaware of?


#6

I have only heard of this issue in relation to the homepage, and that was a while back and was easily worked around using .Data.Pages instead of .Site.Pages.


Memory FS not updated on watch rebuild
#7

@Hash_Borgir I’ve recently had similar problems with the “homepage” I just filed a bug but then upgraded from .18.1 to .19 and it seems to have gone away. I recently changed my partial to .Site.RegularPages in my template from .Data.Pages.