-# Copy everything to the site.
-scp tests/*.html tests/*.js $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.
+ scp -r gallery tests jsdoc experimental $site \
+ && \
+ scp dygraph*.js gadget.xml excanvas.js thumbnail.png screenshot.png docs/* $site/
+else
+ echo "generate-documentation.py failed"
+fi