- commit
- c8aece2669e285a0e4b6dfb4de328bf6e6ec8c92
- parent
- 8809d19493521df274c28d545f34ff7f654cfe06
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2018-10-19 13:39
use md filter instead of getMarkdown breaks caching
Diffstat
| M | index.php | 12 | +----------- |
1 files changed, 1 insertions, 11 deletions
diff --git a/index.php b/index.php
@@ -135,16 +135,6 @@ class Pupupu 135 135 rmfile($this->getTarget($path)); 136 136 } 137 137138 -1 public function getMarkdown($path)139 -1 {140 -1 $key = "md:$path";141 -1 if (!in_array($key, $this->cache)) {142 -1 $v = MarkdownExtra::defaultTransform($this->get($path, 'md'));143 -1 $this->cache[$key] = $v;144 -1 }145 -1 return $this->cache[$key];146 -1 }147 -1148 138 public function getYaml($path) 149 139 { 150 140 $key = "yml:$path"; @@ -216,7 +206,7 @@ class Pupupu 216 206 217 207 $page = $this->getYaml($path); 218 208 $site = $this->getYaml('/_site');219 -1 $body = $this->getMarkdown($path);-1 209 $body = $this->get($path, 'md'); 220 210 221 211 $template = $page['_template'] ?? 'default.html'; 222 212 $html = $this->twig->render($template, array(