3 ms·
Does Pelican allow to use external content files that are not written in Markdown? I'd like to load content from a JSON file to enrich certain pages or even cre
by FrontAid 6y ago
Does Pelican allow to use external content files that are not written in Markdown? I'd like to load content from a JSON file to enrich certain pages or even create whole site structures dynamically. I couldn't find anything related in neither the documentation nor the plugin repo.
edit: It seems one might be able to write a custom reader for that according to https://docs.getpelican.com/en/stable/internals.html#how-to-implement-a-new-reader https://docs.getpelican.com/en/stable/internals.html#how-to-...
- dragonsh 6y agoUse the reader plugin pelican-json-reader [1] and modify for your own use case. [1] https://github.com/jessaustin/pelican-json-reader https://github.com/jessaustin/pelican-json-reader
- FrontAid 6y agoThanks. It seems that Pelican is very restrictive in what content structures it allows. Do you know whether it can work with arbitrary JSON structures somehow?
- dragonsh 6y agoIn my other post I put a link [1] to pelican internal model. You can customise it the way you want as it’s a simple model. It’s not restrictive. You can write a plug-in to do what you would like and it’s easy with version 4.5. [1] https://docs.getpelican.com/en/stable/internals.html#overall-structure https://docs.getpelican.com/en/stable/internals.html#overall...
- mixmastamyk 6y agoWrite a short python or javascript to do what you want and put it in a build script.