There is a config param in jekyll called production_url. I can\'t find any information on how to use it.
Ideally i would like to be able to generate permalinks with loc
This also worked for me:
$ JEKYLL_ENV=production jekyll serve