Divide list of blog posts in multiple sublists based on (first) category
Current Situation: I use Hugo and the Hugo coder theme to maintain a private website including a blog. On the website, I have a “Blog” section that internally corresponds to the folder structure...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
I think that the simplest way to render these different lists would be to group the blog posts by checking for the value of the categories parameter. For example <section class="container list">...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
Thank you for your suggestion. Unfortunately, it doesn’t work. The list of posts disappears completely and I got a blank page without any blog posts left (though with the appropriate header, footer,...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
FredL: Another idea? I cannot make a further guess without seeing at the very least a minimal project with dummy content that replicates your actual project’s structure. Also see the forum Requesting...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
Of course, here you can see the actual layout files on which I based my website and parts of which I copied into the previous post. Additionally, here is the structure of my website Website |---------...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
FredL: categories = ["A"] In the above categories is a map. Do you assign more than one categories to a file? EDIT I do not use Hugo Extended. It appears that the theme author has not commited the...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
At first, I did. Then I set one category per blog post (still didn’t work) and now after your question I deleted the map leaving only the string. This creates an error though Failed to render pages:...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
Give this a try: git clone --single-branch -b hugo-forum-topic-31882 https://github.com/jmooring/hugo-testing hugo-forum-topic-31882 cd hugo-forum-topic-31882 hugo server Then visit...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
Based on your code @jmooring, I gave the following a try without success {{ define "title" }} {{ .Title }} · {{ .Site.Title }} {{ partial "math.html" . }} {{ end }} {{ define "content" }} <section...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
FredL: .Render "li" You are using the .Render function from within a two levels deep list context and Hugo cannot find li.html. Instead use $.Render "li" so that li.html is called directly from the...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
Thanks @alexandros for the remark. That actually solved the error and now I do get a list of blog posts by the categories. The following is the one I get with the help of @jmooring’s code and the...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
FredL: All dates are wrong. The blog posts are all different with different dates but it gets displayed always the same date. Particularly irritating is that the 29 Nov 2020 isn’t the date of any of...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
Thanks @alexandros, that solved the date problem. Considering your remark, do these other questions don’t have anything to do with Hugo and Hugo coding, i.e. don’t I have to change the list.html file...
View ArticleDivide list of blog posts in multiple sublists based on (first) category
FredL: Considering your remark, do these other questions don’t have anything to do with Hugo and Hugo coding I will give you a detailed reply, but yes your questions are not quite related to Hugo....
View ArticleDivide list of blog posts in multiple sublists based on (first) category
Thank you very much for the detailed reply @alexandros! I will look elsewhere then. Read full topic
View ArticleDivide list of blog posts in multiple sublists based on (first) category
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed. Read full topic
View Article
More Pages to Explore .....