Skip to content

Instantly share code, notes, and snippets.

@ntotten
Last active December 11, 2015 00:08
Show Gist options
  • Save ntotten/4513989 to your computer and use it in GitHub Desktop.
Save ntotten/4513989 to your computer and use it in GitHub Desktop.
Static Site Generation with DocPad on Windows Azure Web Sites
:: 3. Build DocPad Site
echo Building the DocPad site
pushd %DEPLOYMENT_TARGET%
call %DEPLOYMENT_TARGET%\node_modules\.bin\docpad.cmd generate
IF !ERRORLEVEL! NEQ 0 goto error
azure sites deploymentscript --node
npm install -g docpad
docpad run
# The DocPad Configuration File
# It is simply a CoffeeScript Object which is parsed by CSON
docpadConfig =
# Template Data
# =============
# These are variables that will be accessible via our templates
# To access one of these within our templates, refer to the FAQ: https://github.com/bevry/docpad/wiki/FAQ
prompts: false,
templateData:
# Template data here...
# Export our DocPad Configuration
module.exports = docpadConfig
git add .
git commit -m "Added docpad site"
git remote add origin https://github.com/<username>/<repository>.git
git push origin master
module.exports = require(__dirname+'/node_modules/docpad/out/bin/docpad-server');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment