List of Posts
- This topic has 5 replies, 2 voices, and was last updated 7 months ago by .
- AuthorPosts
- July 30, 2020 at 12:00 pm#3295
benthroop
I am using the Square theme and want to make a simple list of posts on the left side. Basically make my own post feed. Can anyone point me in the right direction for implementing this? Happy to go through the docs but honestly not sure where to start. Is this a case of editing the theme or is there a layer on top for modifications to be done properly so as to support theme updates?
Do folks store theme/site source in Git separate from the deployed site? I’m using Dropbox for the source content so multiple computers work correctly, but what about the correct way to manage theme edits or additions as I’ve outlined?
If this is all documented a link would be great! Cheers
PS
I just got started and so far, really digging Publii. Great work. It fits in the exact spot you are aiming at – lighter and simpler than WordPress, Squarespace, and most every other blogging platform. But compared to Jekyll it’s soooo nice. I just want to write stuff and not think about Markdown. Thanks for building this!
July 30, 2020 at 12:11 pm#3296Bob
SupportHi benthroop,
I am not sure if I understood you correctly as the list of all posts is displayed on the right side in the Square theme.
--
Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!July 30, 2020 at 1:30 pm#3297benthroop
Hey Bob thanks for the quick response.
To clarify, I want the left side to show a list of post titles (with no body copy) below the title of the current post that is fully shown on the right.
In this setup, the front page will display the most recent post in full (using the “featured” function, currently, but ideally just the most recent), so this would be how users would navigate to prior posts.
July 30, 2020 at 6:25 pm#3308benthroop
Actually I am set. Found the docs and will pound on it and post back here if I get stuck. Cheers.
July 30, 2020 at 6:55 pm#3310benthroop
Ok made some headway and I have a question.
On the theme’s index.html, there is a posts variable what has an array of all posts. I am able to display them with this chunk of code put in the left side of the layout:
<br> <h1>All Posts</h1>-
{#each posts}}
- {{title}} {{/each}}
Works fine. However, on Post.hbs, there is no posts array filled in, so this code doesn’t work. How can I get all of the posts into Post.hbs’s scope?
July 30, 2020 at 8:43 pm#3313benthroop
Haha ok I figured it out. @website.contentStructure.posts
I’ll see myself out.
- AuthorPosts
- You must be logged in to reply to this topic.