Skip to content


Subversion checkout URL

You can clone with
Download ZIP


setMetaDefaults doesn't work on the "write" document property #434

iandoe opened this Issue · 3 comments

3 participants


Hello, i am currently trying to only render the index.html page in every of my directory, so by default set everything to write: false and set write: true manually only on the index files (the other files are fed to the index page via a for loop, so i don't need them in my final output directory), so i followed the example in the beginner guide and modified it this way:

          pages: ->
              @getCollection("html").findAllLive({isPage:true}).on "add", (model) ->
                  model.setMetaDefaults({ write: false })

But this isn't working and every file is getting written to the out/ directory.

Setting write:false manually does work tho. Any help ?

Docpad 6.21.10
npm 1.2.10
node v0.8.16

Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.


Definitely sounds like a bug, for the meantime can you try model.setMeta({ write: false }) - does that work?


@balupton I have exactly the same problem as @iandoe, although I can set other default meta values, for example, I'm using:

features: ->
    @getCollection("html").findAllLive({relativeOutDirPath: '_features'}).on "add", (model) ->
        model.setMeta({write: false})
        model.setMetaDefaults({menuHidden: true})

...which works fine. So thanks for the suggestion, but I'm not sure why and when to use setMeta instead of setMetaDefaults otherwise.


May be fixed in v6.46.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.