/eckyputrady.github.io

Haskell-based static site generator for my personal website

Primary LanguageHaskellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

StaticGen

Static site generator in Haskell. This doesn't try to be smart. The configuration is the code.

Development Mode

Start the ghcid daemon so that your change is published immediately.

ghcid -c "stack ghci --no-load" --test "Lib.someFunc" --reload "input" --restart "package.yaml"

Then setup an HTTP server in output folder. For example, by using python:

cd output
python -m SimpleHTTPServer

Deploying

There's no need for build step since entering development mode already build a deployment-ready artifact.

Now, we deploy by pushing to master branch.

NOTE: Make sure you have committed everything in the source branch!

rm -rf /tmp/output
mv output /tmp/output
git checkout master
mv .git /tmp/.git
rm -rf *
mv /tmp/output/* .
rm -rf /tmp/output
mv /tmp/.git .git
git add -A
git commit -am "New version"
git push origin master