perf: ⚡ add twig caching
This commit is contained in:
parent
7f2c7edf76
commit
614bf9d3b6
2 changed files with 4 additions and 4 deletions
|
@ -24,7 +24,7 @@ $adapter = new PostHandler($SITE_CONFIG);
|
|||
|
||||
$loader = new \Twig\Loader\FilesystemLoader(['./templates', './user_content']);
|
||||
|
||||
$twig = new \Twig\Environment($loader,['debug' => true]);
|
||||
$twig = new \Twig\Environment($loader,['cache' => 'twig_cache']);
|
||||
$twig->addExtension(new Twig\Extra\Markdown\MarkdownExtension());
|
||||
|
||||
use Twig\Extra\Markdown\DefaultMarkdown;
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<caption>Directory contents:</caption>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th class="hsmol_hide">Name</th>
|
||||
<th>Title</th>
|
||||
<th class="entry_update_time hsmol_hide">Modified</th>
|
||||
</tr>
|
||||
|
@ -21,11 +21,11 @@
|
|||
<td>
|
||||
{{ fa[subpost.post_metadata.icon] | raw }}
|
||||
</td>
|
||||
<td>
|
||||
<td class="hsmol_hide">
|
||||
<a href={{subpost.post_path}}>{{subpost.post_basename}}</a>
|
||||
</td>
|
||||
<td class="entry_title">
|
||||
{{ subpost.post_metadata.title }}
|
||||
<a href={{subpost.post_path}}>{{ subpost.post_metadata.title }}</a>
|
||||
</td>
|
||||
<td class="entry_update_time hsmol_hide">
|
||||
{{ subpost.post_update_time }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue