The following are issues the DocPad team are aware of and will fix shortly:
Chances are this isn't a problem within DocPad, but rather one of your Node/NPM installations. Run the following in Terminal, once done, try your original action again:
sudo chown -R $USER /usr/local ~/.npm
chmod -R 755 ~/.npm
Be sure that your tmp dir is writable for the current user:
sudo chown -R $USER:$GROUPS ~/tmp
It turns out that Windows will prefer to treat the local
docpad.jsfile as the executable versus the global
docpad.cmdfile. To get around this, type
docpad.cmd runinstead in projects that have a
docpad.jsfile. More information here.
File watching is a pretty timid thing. We're currently working on making it better. There are currently two methods for watching files:
watchFile. The default is
watch, and it uses the operating system's watching mechanisms. However, sometimes those mechanisms aren't the best. If that's the case, we'd like to switch our watching method to
watchFile. It's slower, but it works when
watchOptions: preferredMethods: ['watchFile','watch']
Mac OS X users are most likely to encounter this issue.
watchOptions: catchupDelay: 0
This occurs when you run
docpad runinside a directory that already has existing files, but doesn't have a structure that resembles a DocPad project. We can't directly ask you if you would like to use an existing skeleton for the basis of your new website, as pulling in a skeleton inside a non-empty directory may overwrite your existing files. If would like to still use a skeleton for the basis of your new website, you will have to run DocPad inside a new empty directory. If you would like to start your website from scratch (not use an existing skeleton) then you can follow the Getting Started guide. Hope that helps :) If you need more help then check out our Support Channels.
- Reinstall git and make sure to select the option during installation that asks if you would like to add it to your
PATHvariable (may also be called, would you like git to be available to the command line)
- Manually add the location your git binary resides in to your
As Node.js is like an octopus, able to do many things at the same time, sometimes Node.js will always try to do too many things than the operating system will let it. In which case, you can increase the amount of files allowed at the same time by running
ulimit -n 8192in your terminal.
There are a few things you can do:
- (e.g., instead of using SASS, use nodesass, Stylus, or Less)
Template engines by default escape all variable output. Escaping is when we turn things like the open bracket
<into its html entity equivalent
<. This helps prevent malicious code accidentally being injected into your website which can open the door to XSS attacks. As such, we have to use a special syntax to keep the variable unescaped when outputted. The special syntax is different for the templating engine your using, so here are the ways we know:
<%- content %>instead of
<%= content %>
!= contentinstead of
!= contentinstead of
Be sure that you use the correct syntax for your template language. Refer to the documentation of your chosen language. For example: When you want to put the output of a variable into the content of an (HTML) element in Jade, you must not write a whitespace between the element and the
=. So this is wrong:
title = document.titleand that is correct:
Once that's done, try whatever you were doing again. You may need to run
rm -Rf node_modules; npm installas well.
Once it's all working, then you're free to resume Dropbox syncing.
The Jade compiler uses the full file content on the disk to show where the parsing error is. But since Docpad strips the meta header before submitting the data to the Jade compiler, you must add the number of lines of this header to get the right error spot in your code.