diff --git a/node/docpad.coffee b/node/docpad.coffee index 4a8f6ae1b..de1c9873b 100755 --- a/node/docpad.coffee +++ b/node/docpad.coffee @@ -2,32 +2,7 @@ # It is simply a CoffeeScript Object which is parsed by CSON docpadConfig = { - outPath: '../docs', - renderPasses: 1, - - enabledPlugins: - handlebars: false - html2coffee: false - jade: false - marked: false - paged: false - livereload: false - - # Check Version - # Whether or not to check for newer versions of DocPad - checkVersion: true # default - - documentsPaths: [ # default - 'documents' - ] - - # Files Paths - # An array of paths which contents will be treated as files - # If it is a relative path, it will have the resolved `srcPath` prepended to it - filesPaths: [ # default - 'files' - 'public' - ] + outPath: '../docs' # ================================= # Template Data @@ -112,6 +87,22 @@ docpadConfig = { @site.keywords.concat(@document.keywords or []).join(', ') + # ================================= + # Custom Collections + + collections: + uiElements: -> + @getCollection("documents").findAllLive({type: $in: ['UI Element']}, [{title: 1}]) + + uiCollections: -> + @getCollection("documents").findAllLive({type: $in: ['UI Collection']}, [{title: 1}]) + + uiViews: -> + @getCollection("documents").findAllLive({type: $in: ['UI View']}, [{title: 1}]) + + uiModules: -> + @getCollection("documents").findAllLive({type: $in: ['UI Module', 'UI Behavior']}, [{title: 1}]) + # ================================= # DocPad Events diff --git a/node/src/documents/index.html.eco b/node/src/documents/index.html.eco index de890ec9b..de800f098 100755 --- a/node/src/documents/index.html.eco +++ b/node/src/documents/index.html.eco @@ -4,10 +4,10 @@ css : 'index' title : 'Getting Started' type : 'Semantic' --- -<% uiElements = @getCollection("documents").findAllLive({type: $in: ['UI Element']},[{title: 1}]).toJSON() %> -<% uiCollections = @getCollection("documents").findAllLive({type: $in: ['UI Collection']},[{title: 1}]).toJSON() %> -<% uiViews = @getCollection("documents").findAllLive({type: $in: ['UI View']},[{title: 1}]).toJSON() %> -<% uiModules = @getCollection("documents").findAllLive({type: $in: ['UI Module', 'UI Behavior']},[{title: 1}]).toJSON() %> +<% uiElements = @getCollection("uiElements").toJSON() %> +<% uiCollections = @getCollection("uiCollections").toJSON() %> +<% uiViews = @getCollection("uiViews").toJSON() %> +<% uiModules = @getCollection("uiModules").toJSON() %>