How to get collections from sub-folder in docpad?
问题 my folds structure are something like this: documents techs docs I want to get a collection from docs, my code is : techs: -> @getCollection("html").findAllLive({relativeOutDirPath: /techs/docs/},[{date: -1}]).on "add", (model) -> model.setMetaDefaults({layout: "post"}) It just won't works... Could somebody tell me what's going on? 回答1: The /techs/docs/ in {relativeOutDirPath: /techs/docs/} is parsed as a regular expression, rather than a string. Wrap it in quotes so you have