Converter Plugin that brings Pug support to the Jekyll blog-aware, static site generator.
- Install Pug with NPM. e.g.
$ npm install pug -g - Place the
pug.rbfile into your Jekyll installation under_plugins/ - All static pages and posts ending in the extension
.pugare now processed through Pug automatically. - Layouts need special treatment, see below.
Unfortunately Jekyll doesn't yet allow plugins to pre-process layout files before further processing. To write your layouts in Pug, you therefore have to render them externally. Fortunately this only needs to be done frequently for a small period of time, during layout development.
During layout development, we recommend:
- Create a
_layouts/pug/folder where you will place your "pre-rendered" Pug source. - Create a
Makefileor shell script to execute the Pug compile-and-watch command:pug -w -o ../ *.pug - In another terminal, simultaneously run your Jekyll builds: e.g.
jekyll serve -w
See LICENSE.