Hugo

Adding new section to project pages

Hi all,

Apologies if this has been answered before, but I searched and couldn’t find a solution.

I’ve recently migrated over to Hugo, using the Academic theme. I’ve added a new section type called ‘code’, based on ‘posts’ but customised somewhat, and as a separate defined section/type.

I want to add links to code associated with specific projects on the project page, in the same way that Talks or Publications or Posts can be. I edited the layout file (https://github.com/philipclare/philipclare.com/blob/master/layouts/project/single.html), and found a block of code that corresponds to each type, and added a new one, with some customisation (lines 68-81). When I do that, links to code pages appear on the project page. Success!

But what I can’t figure out is the heading - posts, publications and talks each have their own heading, under which the category is grouped. But my code is not coming up under a heading, and I’m not sure why (or what to edit to change it). It looks like the line 71 of the code:

<h2>{{ (i18n "code") }}</h2>

should add the heading… when I remove that line from the other sections, the heading disappears. But the one for code won’t render, and I’m not sure why.

For example, see:


The top link is a talk, the rest are code, which appear in their relevant sections linked at the top of the site. But the code does not have it’s own heading.

Would appreciate if someone could point me in the right direction.

Thanks

this is for multi-linguual pages.
read more here to configure it correct

Hiya! The Academic theme was created by @neutreno. It has a dedicated issue queue and community chat.