-# Copy everything to the site.
-scp tests/*.html tests/*.js tests/*.png $site/tests/ \
-&& \
-scp dygraph*.js gadget.xml excanvas.js thumbnail.png docs/* $site/
+# Generate documentation.
+./generate-documentation.py > docs/options.html
+if [ -s docs/options.html ] ; then
+ ./generate-jsdoc.sh
+
+ # Copy everything to the site.
+ rsync -avzr gallery common tests jsdoc experimental plugins $site \
+ && \
+ rsync -avzr dygraph*.js gadget.xml excanvas.js thumbnail.png screenshot.png docs/ $site/
+else
+ echo "generate-documentation.py failed"
+fi