Skip to content

Commit

Permalink
_docs/customization.md: Fix syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
PhrozenByte committed Dec 21, 2015
1 parent ebbf034 commit bef8b9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Pages can be used like the following:
{% endfor %}
&lt;/ul&gt;</code></pre>{% endraw %}

Additional to Twigs extensive list of filters, functions and tags, Pico also provides some useful additional filters to make theming easier. You can parse any Markdown string to HTML using the `markdown` filter. Arrays can be sorted by one of its keys or a arbitrary deep sub-key using the `sort_by` filter (e.g. `{&#37; for page in pages|sort_by("meta:nav"|split(":")) &#37;}...{&#37; endfor &#37;}` iterates through all pages, ordered by the `nav` meta header; please note the `"meta:nav"|split(":")` part of the example, which passes `['meta', 'nav']` to the filter describing a key path). You can return all values of a given key or key path of an array using the `map` filter (e.g. `{% raw %}{{ pages|map("title") }}{% endraw %}` returns all page titles).
Additional to Twigs extensive list of filters, functions and tags, Pico also provides some useful additional filters to make theming easier. You can parse any Markdown string to HTML using the `markdown` filter. Arrays can be sorted by one of its keys or a arbitrary deep sub-key using the `sort_by` filter (e.g. `{% raw %}{% for page in pages|sort_by("meta:nav"|split(":")) %}...{% endfor %}{% endraw %}` iterates through all pages, ordered by the `nav` meta header; please note the `"meta:nav"|split(":")` part of the example, which passes `['meta', 'nav']` to the filter describing a key path). You can return all values of a given key or key path of an array using the `map` filter (e.g. `{% raw %}{{ pages|map("title") }}{% endraw %}` returns all page titles).

You can use different templates for different content files by specifying the `Template` meta header. Simply add e.g. `Template: blog-post` to a content file and Pico will use the `blog-post.twig` file in your theme folder to render the page.

Expand Down

0 comments on commit bef8b9d

Please sign in to comment.