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.

Theme Dev: Frontpage vs. blog page

  • #5760
    Avatar photo[anonymous]

    Hi guys,

    I’m currently working on a theme Publii.
    Now I ran into an issue that I cannot easily solve.
    Maybe one of you has an idea.

    problem: frontpage vs. blog page
    The theme has a frontpage and a blog page.
    The frontpage should show some featured posts + fancy stuff and
    the blog page should have the whole blog available – and is *not* on the front page

    solution1: custom tag page
    This isn’t easily possible – but with custom tag pages i thought it should work.
    i created a custom tag and a related template page. in the menu i could now create an item “blog” that points to a custom tag-template.hbs.

    Downside: i would need to tag every single post with the default tag i.e. “blog” :/

    solution2: using @website.contentStructure in custom tag page
    Next idea i had was to use @website.contentStructure in the custom tag page to get all the posts available. This works.
    Downside: the @pagination does not work because it is limited to the specific tag :/

    now i’m stuck.

    is there any option to get this working without developing own helpers in helpers.js?

    Any ideas are welcome.

    #5766
    Avatar photoBob

    There is no easy way for that, Publii is a blog-oriented CMS and that’s why it works the way it does.
    I think you can consider using two websites, one for the front page the second one for the /blog/ location.

    #5770
    Avatar photo[anonymous]

    Thanks very much for the fast reply! I anticipated this answer all ready 🙂

    i now decided to revert to the tag-Approach. Marking every post with a theme defined blog-tag. in the custom-tag page i can do all the stuff. it’s a workaround, but it’s workable. i will then manually filter out the custom tag, if required (i.e. tags.page)

    going for a 2nd websites was also a thought, but i forecast even more pain in the end.

    Again Thanks and great software you guys develop here. not yet perfect, but really on it’s way.