aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/theme_snapshot
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/theme_snapshot')
-rwxr-xr-xscripts/theme_snapshot17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/theme_snapshot b/scripts/theme_snapshot
new file mode 100755
index 0000000..ab3ac7f
--- /dev/null
+++ b/scripts/theme_snapshot
@@ -0,0 +1,17 @@
+#!/bin/sh -x
+
+# A script to install a theme, configure the default site to use it,
+# generate it, and then take a screenshot of the page.
+
+#This is a hack.
+
+theme_name=$1
+tempsite=temp_$theme_name
+nikola init $tempsite
+cd $tempsite
+doit install_theme -n $theme_name
+sed -i s/\'site\'/\'$theme_name\'/g conf.py
+sed -i s/http:\/\/nikola\.ralsina\.com\.ar/http:\/\/${theme_name}\.nikola\.ralsina\.com\.ar/g conf.py
+echo 'DEPLOY_COMMANDS = [ r"rsync -rav --delete output/* ralsina@lateral.netmanagers.com.ar:/srv/www/'${theme_name}'" ]' >> conf.py
+doit && doit deploy
+capty http://${theme_name}.nikola.ralsina.com.ar ../${theme_name}.png