GetPublii / Publii

The most intuitive Static Site CMS designed for SEO-optimized and privacy-focused websites.
https://getpublii.com
GNU General Public License v3.0
6.06k stars 407 forks source link

[Feature Request]: Option to render other .hbs (static pages) files like home.hbs #1330

Closed claudemircasa closed 4 months ago

claudemircasa commented 5 months ago

Feature Description

Plublii is promising, but I'm creating a custom theme and it's not possible to add other static pages (contact, about us, etc). Is this scheduled for future releases?

bobmitro commented 5 months ago

You can achieve this by marking the post as hidden and/or creating additional post templates.

claudemircasa commented 5 months ago

You can achieve this by marking the post as hidden and/or creating additional post templates.

I believe it is not the same thing. I would like to be able to create a "contact.hbs" file with custom code, for example, and have this template compiled as a static page in the root directory as "contact.html"

bobmitro commented 5 months ago

Instead, you can create a post template featuring your custom code and apply it to the hidden post. This approach will function as you've described.

bobmitro commented 5 months ago

In general, the post marked as hidden works as a "static" page.

claudemircasa commented 5 months ago

In general, the post marked as hidden works as a "static" page.

How do I create this additional template for posts?

bobmitro commented 5 months ago

I recommend visit the dev docs https://getpublii.com/dev/how-to-create-custom-templates/

claudemircasa commented 5 months ago

thank's @bobmitro

claudemircasa commented 4 months ago

@bobmitro Can you help me with this?

image image image

GetPublii commented 4 months ago

It should work; the code is ok. Where do you edit the theme files? Provide the path to your theme. Also, try restarting the app.