Commit 313ea40
committed
Use alternate way to set collection section pages' layout to
Under the `collections` section, this website has been using the
directory structure in a different way from Hugo's assumption on
sections. Hugo treats a sub-section's _index.md differently from other
pages: _index.md uses a section template rather than a single template.
However, this website designates a sub-section's _index.md as an equal
page to other pages with regards to the template applied.
The old way this website used to render an _index.md under the
`collections` section using a single template is to call
`.Render "single"` in the section template applied to the `collections`
section (`layouts/_default/collections.html`). However, this way has
stopped working since Hugo v0.146.2.
Therefore, it is now necessary to switch to a new way to achieve this
effect: under the `collections` section, for each page with the
`section` kind, set `layout: single` in the page's front matter.
Nevertheless, this alternate way is probably clearer and less quirky
even if the old way was not broken.single
1 parent 03bceb3 commit 313ea40
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
This file was deleted.
0 commit comments