paolobrasolin / jekyll-antex

Use arbitrary LaTeX in your Jekyll website!
https://paolobrasolin.github.io/jekyll-antex/
MIT License
3 stars 1 forks source link

Auto-regeneration enters infinite loop on TeX compilation error #1

Open paolobrasolin opened 7 years ago

paolobrasolin commented 7 years ago

When an Antex::Command throws an error (e.g. caused by invalid TeX code), if we're using incremental builds with the jekyll server, a rebuilding loop is entered.

paolobrasolin commented 7 years ago

Antex caching causes the loop, because Jekyll is listening to the cache folder too. A solution is adding an exclusion to _config.yml:

exclude:
 - .antex-cache/'

A better solution would be to exclude the folder automatically using values from

antex:
  dirs:
    work: .antex-cache
    dest: .antex-cache/antex
paolobrasolin commented 6 years ago

Another solution could be to simply put the cache folder outside of the project root. E.g.:

antex:
  dirs:
    work: /home/username/.antex-cache
    dest: /home/username/.antex-cache/antex

Note the tilde ~ cannot be expanded, so you must use the full home path if you need it.

paolobrasolin commented 6 years ago

OK, let's just close the issue after documenting this.