Sign in

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

  • This topic has 2 replies, 3 voices, and was last updated 1 month ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8611
    Avatar photosweb

    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.

    --
    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!

    #8632
    Avatar photocandidexmedia

    @sweb: 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/

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.