Hello, I am new to hugo and trying to adding different sections in the existing lanyon theme. For example you might have two blog folders each contains a different list of posts. I will have section called “otherposts” inside content folder as in HugoBasicExample. Here is what I did to achieve that:
In the “content” folder, create otherposts folder
in the theme folder (lanyon-hugo theme folder). Add this entry to the siderbar.html
<a class=“sidebar-nav-item {{ if eq .Url “otherposts” }} active {{ end }}” href="/otherposts">Other Posts
In the “indexes” folder create “otherposts.html” as the copy of post.html
create otherposts folder with copying the contents from post folder (li.html, single.html) inside layouts folder.
It seems worked, however, this approach seem to have lots repetitive code. any suggestion with better methods?
The current lanyou-hugo theme author suggested me to post here since he is no longer use hugo. Many thanks for any input!