queensferryme / hugo-theme-texify

A minimal, latex-style hugo theme for personal blogging
https://texify.qufy.me
MIT License
134 stars 48 forks source link

How would one add a new main section? #23

Closed evanaze closed 2 years ago

evanaze commented 2 years ago

Hi, I love the theme, and I appreciate the work that has gone into it. How could I add a new section under the main heading formatted like the posts index? I've tried copying single.html and index.html under my project's layouts folder, but have had no success so far. By adding my "daily" section to the config.toml I can get the section to appear, but it isn't formatted correctly. Any help would be appreciated.

Screen Shot 2022-05-23 at 9 12 13 PM

evanaze commented 2 years ago

I was able to accomplish this by just learning some basic Hugo knowledge. This video helped a lot. I basically created a new directory layouts/daily with layouts/daily/list.html as a copy of _default/index.html and layouts/daily/single.html as a copy of _default/single.html from the template with minor changes, namely changing {{ $paginator := .Paginate (where .Site.RegularPages "Type" "==" "post") }} to {{ $paginator := .Paginate (where .Site.RegularPages "Type" "==" "daily") }}.