The website is generated based on template files and the main configuration file docpad.coffee
.
Learn more about conf-boilerplate and docpad to know how it works.
git clone git@github.com:pgbr/www-2017.git
- Install project dependencies
npm install
- Run the project
npm run-script docpad run
The basic structure of the project is given in the following way:
. |-- out/ |-- src/ | |-- documents | |-- files | |-- layouts | |-- partials |-- docpad.coffee |-- package.json |-- publish.sh
This is the main file configuration. All basic site information is set here. You can also edit template and assets files to change anything that you can on website.
This is where the generated files are stored, once DocPad has been runned. However, this directory is unnecessary in versioning, so it is ignored (.gitignore).
There are many more useful commands from docpad you might want to use.
All of them can be called using the shortcut npm run-script docpad
Sample:
npm run-script docpad run
- Starts the http server and watch any changes to re-generate the website on the fly. Very useful when creating the website.npm run-script docpad clean
- Cleanup all output folders.npm run-script docpad generate
- Generate the website.
Run npm run-script docpad help
to see more.
If you use github and would like to see your website running, please use the publish.sh. It will automatically checkout the gh-pages branch and generate and push a new version of the website.
PS: The gh-pages
branch must exist previously to work properly.
Just run npm run-script docpad generate
then just publish the out
folder to any host of your choice.