Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

index.hbs on a hidden post (for a blog roll page)

  • #8611
    Avatar photo[anonymous]

    Using simple theme with override folder (outlined here https://forum.getpublii.com/topic/static-home-page-on-a-theme/)

    I would like to move the default index.hbs (blog roll) to it’s own page. Ive created a hidden post (as recommended in some other docs)

    Ive also created a custom post template inside my theme override.

    post-articles.hbs (copied the default simple theme index.hbs and pasted in this new template file)
    adjusted the config.js to include a new template option

    "postTemplates": {
            "articles": "Blog Roll"
        },

    Assigned the newly created template to the hidden post.

    But it does not render any posts.

    is blank. I realize there is a conditional inside the simple theme default index. But I have removed the conditional and still not getting any posts.

    Is this handle bar code only accessible via index.hbs?

    {{#each posts}}

    Any tips on how I could accomplish this? I essentially want to move my default blog roll (index) to a different page. This would be similar to what you have to do in WordPress when you assign the blog page to a page and the index to a custom home page.

    #8630
    Avatar photoBob

    There is a wrong context, post templates are post templates, and the index is the index. It won’t work that way.

    #8632
    Avatar photo[anonymous]

    [anonymous] If I understand correctly, you want to have your post listings on a post template rather than on the home page template, correct?

    If so, this may be helpful: https://getpublii.com/dev/create-post-list-from-specific-tags/ (you could have it display all your tags)

    Also check out the common tags for posts: https://getpublii.com/dev/post-page-tags/