Skip to content

tommyandjacky/fis-parser-nunjucks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fis-parser-nunjucks

Feature

precompile nunjucks template, support extend and include tags.

Usage

$ npm install -g fis-postpackager-nunjucks
$ vi path/to/project/fis-conf.js
//file : path/to/project/fis-conf.js

fis.config.set('modules.parser.tmpl', 'nunjucks');

// http://mozilla.github.io/nunjucks/api.html
fis.config.set('settings.parser.nunjucks', {
     env : {
         tags : {
             blockStart: '{%',
             blockEnd: '%}'
         }
     }
});

KNOWN BUG

you need use single quote ' to wrap the resource path, otherwise fis won't get right resource path.

e.g.

<header>
<img src="a.png"> <!-- wrong -->
<img src='a.png'> <!-- right -->
<h1>This is header</h1>
</header>

DEMO

https://github.com/hefangshi/fis-parser-nunjucks-demo

About

nunjucks precompiler for fis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published