Stories list on the index page does not show posts #9

Closed
opened 2022-06-23 13:57:40 +00:00 by emacsen · 6 comments
emacsen commented 2022-06-23 13:57:40 +00:00 (Migrated from gitlab.com)

The site index page, https://blog.babka.social has a section for "All stories", which is driven by:

https://gitlab.com/babka_social/babka-social-blog/-/blob/main/index.html#L34

There are two stories. The sticky story does not show up, which is correct, but it doesn't appear the other story does either, which means they're something wrong with either the second story, or something else.

That should be fixed.

The site index page, https://blog.babka.social has a section for "All stories", which is driven by: https://gitlab.com/babka_social/babka-social-blog/-/blob/main/index.html#L34 There are two stories. The sticky story does not show up, which is correct, but it doesn't appear the other story does either, which means they're something wrong with either the second story, or something else. That should be fixed.
emacsen commented 2022-06-23 13:57:40 +00:00 (Migrated from gitlab.com)

assigned to @vosaul

assigned to @vosaul
vosaul commented 2022-06-27 09:38:23 +00:00 (Migrated from gitlab.com)

@emacsen
The algorithm for building a home page is as follows:

  • after the "hero" section, the next "recent posts" section. The last 4 posts are displayed here.
  • the next section is "sticky" where the last post with the status "sticky" in frontmatter is shown.
  • the next section "all posts" where the rest of the posts are displayed, starting with the fifth (since the first four are already shown in the "resent" section).

So as long as you have less than 5 posts, the "all posts" section will be empty.

I think this is logical, but if you want to change this algorithm, I will change it.

@emacsen The algorithm for building a home page is as follows: - after the "hero" section, the next "recent posts" section. The last 4 posts are displayed here. - the next section is "sticky" where the last post with the status "sticky" in frontmatter is shown. - the next section "all posts" where the rest of the posts are displayed, starting with the fifth (since the first four are already shown in the "resent" section). So as long as you have less than 5 posts, the "all posts" section will be empty. I think this is logical, but if you want to change this algorithm, I will change it.
emacsen commented 2022-06-28 21:32:59 +00:00 (Migrated from gitlab.com)

I think it's logical too, but right now it also shows as "All stories" with no content.

I don't know if wrapping the "All stories" in an { %if ... would break the layout, but if not, then I think not showing all stories at all if the length is too short is the right way to address this.

I think it's logical too, but right now it also shows as "All stories" with no content. I don't know if wrapping the "All stories" in an `{ %if ...` would break the layout, but if not, then I think not showing all stories at all if the length is too short is the right way to address this.
vosaul commented 2022-06-29 21:39:28 +00:00 (Migrated from gitlab.com)

Yes, you're right, I'll do it

Yes, you're right, I'll do it
vosaul commented 2022-06-30 09:49:59 +00:00 (Migrated from gitlab.com)

mentioned in merge request !10

mentioned in merge request !10
emacsen commented 2022-07-03 13:19:48 +00:00 (Migrated from gitlab.com)

mentioned in commit 4c03b40e35

mentioned in commit 4c03b40e355d37d0daa31cceb61f78ff65cc18c3
emacsen (Migrated from gitlab.com) closed this issue 2022-07-03 13:19:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
babka/babka-social-blog#9
No description provided.