DocPad and MongoDB

256 Views Asked by At

I'm looking for a way to use DocPad with MongoDB. Tried to google about that, but didn't find anything encouraging. Could you please give at least some hints? Some parts of what I'm developing need to be persisted. Thanks in advance.

2

There are 2 best solutions below

0
On

Starting from version 6.55 released last month, DocPad creates a persistent db file in the root of the project called .docpad.db :

https://github.com/bevry/docpad/blob/master/HISTORY.md

I guess it's a first step in the persistent behaviour you need ; the documents may be parsed and inserted in a Mongo database, because behind the scene, DocPad uses QueryEngine which has an API similar to Mongo :

https://github.com/bevry/query-engine

More work is on the way regarding your concern. Have a look at this discussion that deals with the future architecture of DocPad, especially the importer / exporter decoupling :

https://github.com/bevry/docpad/issues/705

0
On

I've written some code that reads from Mongodb and returns an object that can be rendered into docs. I've also tried to write some code to provide the backend for basic editing of the database but the regeneration after update is not yet working (although it may be by the time you read this!). See https://github.com/simonh1000/docpad-plugin-mongo