Skip to content

Commit

Permalink
Add Twig page
Browse files Browse the repository at this point in the history
  • Loading branch information
rollerozxa committed Aug 7, 2023
1 parent fc5a749 commit 6dcc2f5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions _wiki/Twig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Twig
---

Twig is the name of the templating engine used by Cirrusboard. For documentation about Twig, see [their website](https://twig.symfony.com/doc/3.x/).

All pages in Cirrusboard use the `twigloader()` function which loads Twig along with Cirrusboard-specific extensions. Templates are read from the `templates/` directory.

## Clearing Twig cache
Twig works by compiling the template files into raw PHP that then gets executed. These compiled files can be cached to reduce the overhead of the templating engine. This also means that changes you make to the Twig templates won't immediately take effect unless you clear the Twig cache. If your Twig cache is at the default location, then `./tools/clear-cache.sh` can be used to clear it.

If you're doing more serious development then you would want to set `$tplNoCache` which completely disables the cache and will always compile the template.

0 comments on commit 6dcc2f5

Please sign in to comment.