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.

Adding new pages

  • #3233
    Avatar photo[anonymous]

    Hello! I’m new in Publii and also in Handlebars js. I’m trying to port a simple html/css/js template into Publii.

    I wonder if is possible to render a new page such as an “About” page and adding it to the main menu.

    I’ve tried to create an “about.hbs” page adding the content needed but I can’t reach this page from my static website (preview).

    Can you give some advices?

    #3234
    Avatar photoBob

    Just add a new post and mark it as “hidden” post. If you want to have a unique HTML structure, you can create an additional post template and assign it to a newly created post.

    #3235
    Avatar photo[anonymous]

    Thank you for reply Bob!

    So if I want a different template for that page I have to create a post-TEMPLATE_SLUG.hbs to use with that blog post?

    Basically I can’t create a new page such as the frontpage and render it?

    #3236
    Avatar photoBob
    [anonymous] wrote:

    So if I want a different template for that page I have to create a post-TEMPLATE_SLUG.hbs

    yeap, indeed.

    [anonymous] wrote:

    Basically I can’t create a new page such as the frontpage and render it?

    You can create a post-template with a similar structure as the index.hbs file, but just copying the content of the index.hbs won’t help, the post template has its own handlebars tags https://getpublii.com/dev/post-page-tags/

    #3237
    Avatar photo[anonymous]

    Fine! Thank you very much Bob!