Skip to content

Commit

Permalink
liquid_tags: Added documentation for custom tag delimiters.
Browse files Browse the repository at this point in the history
  • Loading branch information
m000 committed Jun 13, 2020
1 parent 530f295 commit 893429f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion liquid_tags/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,10 @@ comment line `# <!-- collapse=False -->` will be expanded on load but
can be collapsed by tapping on their header. Cells without collapsed
comments are rendered as standard code input cells.

## Configuration settings in custom tags

## Advanced features

### Configuration settings in custom tags
Tags do not have access to the full Pelicans settings, and instead arrange for
the variables to be passed to the tag. For tag authors who plan to add their
tag as in-tree tags, they can just add the variables they need to an array in
Expand All @@ -269,6 +271,15 @@ user's `pelicanconf.py` settings:

LIQUID_CONFIGS = (('PATH', '.', "The default path"), ('SITENAME', 'Default Sitename', 'The name of the site'))

### Custom delimiters
If you are using Liquid Tags in conjunction with some other plugin that also
uses the `{%` and `%}` delimiters to mark its blocks, then chaos will occur.
You can avoid the chaos by defining an alternative set of delimiters for
Liquid Tags. Just add them as a tuple in your `pelicanconf.py` settings:

LT_DELIMITERS = ('<+', '+>')


## Testing

To test the plugin in multiple environments we use [tox](http://tox.readthedocs.org/en/latest/). To run the entire test suite:
Expand Down

0 comments on commit 893429f

Please sign in to comment.