Hugo 0.18 ignores in the section

If the section contains a custom into the section, Hugo ignores it and replaces to the standard list. It’s specially conceived? Or exist a possibility to use a custom in the section?
Version 0.17 correctly processed in the section.

Support for the customs for ever disabled in the Hugo?

No, it is better than ever – you don’t have to use to common hack. Use instead.

I am confused by how it behaves now.

Consider the now-broken theme β€œphugo”. It’s albums used to work perfectly fine with, like here.

With Hugo 0.18 that renders with a list layout - but not ignored, see the effect here. If I rename it to it seemds to be ignored altogether - neither list, nor single.

If the albums moved into a subfolder , so they are not considered sections they work fine. with being rendered as a single.

What do I miss? Or at least, what is a migration path to accommodate new behaviour? Adding another directory layer is highly undesirable.

1 Like not work for sections, it’s work for taxonomies only.

@bep, so if does not work in sections, what do you mean as

So far I do not see how that breaking change can be reasonably accommodated in phugo. May be some hints can be placed in an front matter to steer rendering? What else may be done?

I do not understand why do we need an in the sections if there already exist the with front matter and content.

I do not either, except for @bep have seemed to suggest to use it. I may have missed a context of the suggestion though. The point is that no longer works with hugo 0.18 the way it did with hugo 0.17 in phugo theme and I am trying to undestand what can be done to fix it. works for sections, home page, taxonomy terms, taxonomy lists. That should cover all the current use cases.

I’m on Christmas holiday now, so that is the answer you get from me.

Read the documentation. If that is not good enough, please file an issue on GitHub so we can fix it, so we don’t have to answer the same questions again and again. Then you can keep on using Hugo 0.17 until you understand how to upgrade.

Believe me when I say this: Hugo 0.18 is a big, big improvement – and this means that you can remove your hacks, which, to be honest, you where kind of lucky that worked for sections in 0.17 (the page were generated after the section so index.html overwrote index.html).

OK, opened the relevant issue 2827.


Sorry for my Ebenezer Scrooge tone in my replies earlier – I have spent many hours thinking and implementing this, and I sometimes forget that this may not be obvious to those who have not.

Merry Xmas to all Hugoers!


Sorry to come back on this, but I think that my problem is linked with it:

@bep wrote in Hugo 0.18 Released: Everything Now a Page, and Twice as Fast!: or is content and metadata for the single pages, of content and metadata for the β€œnode” pages – aka the list pages (if you include the home page in that definition).

I find this working: create a /section/ in a section and it renders to /section/index.html in that same section in the public folder.

But when I use this

            {{ $act_section := .Section}}                  
            {{ range where .Site.Pages "Section" $act_section }}       
        	<li><a href="{{ .RelPermalink }}">{{- .LinkTitle -}}</a></li>    
            {{ end }}      

to create a section navigation it uses linktitle from the frontmatter of /section/ but the created link instead points to /section.html which gives a simple list but not the content of /section/
If I just rename /section/ to something else like /section/ everything works fine.
(But then, off course, I have to tweak the server config to use intro.html as default page also which I personally do not prefer).

v0.18.1 BuildDate: 2016-12-30T11:05:34+01:00
uglyURLs = true
relativeURLs = true
canonifyURLs = false

I’m not totally sure what you’re trying to do, but did you check out the .GetPage function? Also remember the section page is and not I’d write some sample code but am on my phone. Also there is .Pages and .RegularPages…

From the above [quote="@bep"] or is content and metadata for the single pages,
[/quote] I expected that would render as index.html which indeed it does. I like to have an index-file in each content subdirectory as every webserver I know will deliver this when a user uses an address like http://domain.tld/section/.
All works fine so far.

I’ll give you the structure:

β”œβ”€β”€ config.toml
β”œβ”€β”€ archetypes
β”œβ”€β”€ content
|   β”œβ”€β”€
|   β”œβ”€β”€ motorhome
|   |   β”œβ”€β”€
|   |   β”œβ”€β”€
|   |   β”œβ”€β”€
|   |   └──
|   β”œβ”€β”€ dogs
|   β”œβ”€β”€ blog
|   └── contact
β”œβ”€β”€ static
β”œβ”€β”€ data
β”œβ”€β”€ layouts
└── themes

and this renders to

└── public
    β”œβ”€β”€ index.html
    β”œβ”€β”€ motorhome.html
    β”œβ”€β”€ motorhome
    |   β”œβ”€β”€ index.html
    |   β”œβ”€β”€ engine.html
    |   β”œβ”€β”€ solar.html
    |   └── chassis.html
    β”œβ”€β”€ dogs.html
    β”œβ”€β”€ dogs
    β”œβ”€β”€ blog.html
    β”œβ”€β”€ blog
    β”œβ”€β”€ contact.html
    └── contact

which is ok so far - and as expected following @bep 's definition.

Now I use above code to produce a sidenav within the motorhome section. It ends up like this:

<li><a href="../motorhome.html">Index</a></li>                   
<li><a href="../motorhome/engine.html">Engine</a></li>            
<li><a href="../motorhome/solar.html">Solar</a></li>            
<li><a href="../motorhome/chassis.html">Chassis</a></li>  

which obviously is wrong since the first line should be like

<li><a href="../motorhome/index.html">Index</a></li>                   

So at least for creating the menue is NOT treated as content and metadata for a single page.

What above code?