Templater
Fepper's Feplet (.mustache) templates can be translated into templates compatible with your backend. Feplet tags just need to be replaced with tags the backend can use. Put these translations into YAML (.yml) files named similarly to the .mustache files in source/_patterns/03-templates
. Follow this example for the correct YAML syntax.
Follow these rules for setting up keys and values:
- Delete the Feplet curly braces for keys.
- Trim any exterior whitespace.
- Leave other control structures and spaces within the key, e.g. !#/>^
- Wrap the key in single quotes.
- Follow the closing quote with a colon, space, pipe, the numeral 2, and a newline
: |2
- Indent each line of the value by at least two spaces.
Run fp syncback
or fp template
.
- Be sure that
backend.synced_dirs.templates_dir
andbackend.synced_dirs.templates_ext
are set inpref.yml
. - The default
templates_dir
andtemplates_ext
settings inpref.yml
can be overridden by similarly named settings in the template-specific YAML files. - Templates prefixed by "__" will be ignored by the Templater as will files in the
_nosync
directory. - The Templater will recurse through nested Feplet templates if the tags are written in the full relative path syntax and have the
.mustache
extension, e.g.{{> 02-components/00-global/00-header.mustache }}
- However, the more common inclusion use-case is to leave off the extension, and not recurse.
Fepper for Drupal and Fepper for WordPress have working examples of templates compatible with the Templater.