I am having issues with grid layout because of the complexity and full control. At the moment, the grid is using masonry. It’s perfect as long as the new article’s thumbnail fits in four blocks of the grid system. But when a Content staff adds a new article and chooses the size of the grid that doesn’t fill the four blocks, it creates a space somewhere randomly. Well, that’s how masonry supposes to work. Here’s the link to the masonry: Masonry · Layout
At the moment, the div is on repeat:
<div id="grid">
{{ $paginator := .Paginate .Data.Pages }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
{{ partial "pagination" . }}
</div>
summary.html has the repetitive div item. The grid-size-class is coming from Forestry.io entry markdown front matter according to editor's preference. For example:
Now, my boss asked me to look into having a fixed layout of the grid and every time someone adds new articles, it will just move and inject the content to the next grid div item rather than make the grid size controlled by Content Editors.
Masonry is not really a problem and Masonry is doing what is expected.
I just want to know if it is possible to have a fixed layout in Hugo and the summary will be just inserting itself into the grid item. The grid layout won’t move at all, but the summary content can when there is a new article.
At the moment, summary.html file is being rendered based on markdown. If I use, .toml file instead of markdown, that will make .toml file extremely long and I will have to redo everything that’s been done. And I don’t think that’s the best solution.
I’m sorry the way you described your issue makes it seem like you’re having a CSS and/or Masonry layout issue.
If what you really mean is having a fixed set of content files and only updating their summary then have a look over here.
Or if what you really mean is displaying a fixed set of posts in reverse order for your grid on your list.html you can easily achieve this with range so that when someone makes a new post it takes its position in the “fixed grid”.
Other than that maybe someone else can understand your issue better than me.