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.

Add custom .hbs Template for search-index JSON

  • #697
    Avatar photo[anonymous]

    Hi guys,

    first of all congratulations to your project and the effort you made with Publii. Recently I tested several “static site generators” trying to figure out which of them would work for a small project on my own, but also for customer projects as a static replacement for WordPress. So far I like a lot what Publii offers, especially it seems to be the only solution with a simple-enough interface to be used by real-live, non-tech endusers. Talking about shortcomings, I would love the possibility to define “custom post types”, being posts with special fields like events, news, faqs to be easily edited by customers in the UI, like “front matter” in terms what other products call it.

    But this post was meant to ask about something else – is it possible (or on the roadmap) to bring in custom hbs templates to the build process? What I would like to do is generate custom JSON files based on posts and tags data (like the feed-json.hbs). The goal would be to serve e.g. JSON to be used in Amazon Echo Briefing Skills or the idea to build a custom search index for JS search plugins like lunar.js or js-search.

    Is something like this possible?

    Regards,

    Andreas

    #729
    Avatar photo[anonymous]

    Hi,

    At this moment it is not possible to create a custom hbs file used as an search engine index, but we will work on this during this issue: https://github.com/GetPublii/Publii/issues/321