Overview
Standard Project Structure
Here is the standard project structure you'll see in DocPad projects:
my-website/
out/
source/
render/
(alsodocuments/
, for backwards compatibility)static/
(alsofiles/
, for backwards compatibility)layouts/
docpad.coffee
package.json
The out
Directory
out
DirectoryThis directory contains anything that DocPad generates. Any new files added to the source
directory will be found here after being rendered and written by DocPad. However any files that are deleted from the source
directory will not be deleted from the out
directory by DocPad, you have to delete them manually. So if you remove a file and it's still there remember to delete it manually. ;-)
The source
Directory
source
DirectoryThis directory contains your website's source files. It contains your layouts, files to be rendered and be in the output and files that are not to be rendered but will still be in the output. The source
can have the following folders:
The
layouts
directoryThe
render
directory (alsodocuments
, for backwards compatibility, for backwards compatibility))The
static
directory (alsofiles
The render
and documents
directories, and the static
and files
directories, are merged; files appearing in either are rendered or copied to the output. However, you should use the former names rather than the latter to conform with the latest naming conventions.
The layouts Directory
Layouts work in a very similar way to files in render
, in that they are rendered and they support meta data. Unlike the files in render
, however, they are not output to the out
directory, as they only exist to wrap files in render
and other layouts within themselves. Layouts work in a nested fashion, with the desired layout being defined by the layout
meta data property within the child layout/document.
The render Directory
The static Directory
Files in this folder, like those in render
, are output to the out
directory. The difference lies in that they are not rendered and do not support meta data. This is where you should put everything that doesn't need to be rendered or need meta data. For example, images, vendor files, plain stylesheet and JavaScript files, etc.
The docpad.coffee
file
docpad.coffee
fileThe package.json
File
package.json
FileLast updated
Was this helpful?