Add static generator

Close #163