- commit
- 6fd5397f0cb38c37448fb2b52c962674f4d7486f
- parent
- 7a07f5b80e04f56f977bf4b1668c72a2af09688d
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2018-10-19 13:12
turn shiftHeadings into a template filter the shift level depends on the template, so it should be defined there
Diffstat
| M | index.php | 2 | +- |
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
@@ -88,6 +88,7 @@ class Pupupu 88 88 $this->twig->addFilter(new Twig_Filter('md', function ($string) { 89 89 return MarkdownExtra::defaultTransform($string); 90 90 })); -1 91 $this->twig->addFilter(new Twig_Filter('shift_headings', 'shiftHeadings')); 91 92 92 93 $this->cache = array(); 93 94 } @@ -216,7 +217,6 @@ class Pupupu 216 217 $page = $this->getYaml($path); 217 218 $site = $this->getYaml('/_site'); 218 219 $body = $this->getMarkdown($path);219 -1 $body = shiftHeadings($body, $site['_shiftHeadings'] ?? 0);220 220 221 221 $template = $page['_template'] ?? 'base.html'; 222 222 $html = $this->twig->render($template, array(