I’m using a version of the PaperMod theme for academic websites. I created a section for publications, and tried to create a list page that breaks publications into subhead sections by type (peer-reviewed publications, essays, etc.). However, the way I coded it the list page breaks after posts overflow into the second page and all the subheadings are retained even if the relevant posts were exhausted on page 1. I am attaching a link to my Github repository so you can see what I’m talking about, if you would be so kind as to help. The relevant “list” is under layouts>publications>“list.html” GitHub - claybdavis/hugo-academicwebsite
I apologize if this query isn’t thorough enough–I’m very much a beginner. I’d be happy to provide more information on request.
thank you for your help with this and for reproducing my entire webpage by hand. How many copies of a publication did you make? Once you get to a certain number the entries move onto a second page that still has each heading despite the fact that the first heading will have no publications under it. I would like to have a smaller limit on the number of posts per page anyway, so if you lower that number in theory you would be able to see this glitch much more quickly. Regardless, is there a way to create a sectioned-out and subheaded list in a more elegant way than what I’ve done?
Have you added something to the template(s) that you haven’t pushed back to your repo?
Disregard. My test was invalid.
I just noticed that you are setting the url in front matter for every publication. For future reference, it’s a lot easier to use the permalinks configuration setting.
Hm, I might have removed the pagination at some point. sorry about that. this way of dividing a list does have the potential to cause that problem, though. do you know of any other way of doing what I’m describing?
I cannot help you without access to a current (non-working) version of your project, and it would be helpful if I didn’t have to create a bunch of content to reproduce the problem you’re experience. Please help me to help you.
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.