summaryrefslogtreecommitdiff
path: root/repo/www/helpers.py
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-08-19 00:10:08 +0200
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-08-19 00:10:08 +0200
commit30e831c9602ea5d4d0603f5ad03baff481771b4b (patch)
tree7548cd29ed5ecf3e975df5a2e6ae130ae488f36f /repo/www/helpers.py
parent338f941477ef6815bd4638bf166f1fddb5a4b3d3 (diff)
downloadmemory-leaks-30e831c9602ea5d4d0603f5ad03baff481771b4b.tar.xz
Put extensions in Lua module instead of sneaking them in environment
Note that neither .cache/config.lua nor .cache/site-tree.json get updated when EXTENSIONS changes. This could be hacked as follows: config = EXTENSIONS="$(EXTENSIONS)" ifneq "$(shell test -f $(config_token) && cat $(config_token))" \ "$(shell ./generate-config-token.py $(config))" .PHONY: $(lua_config) $(site_tree) $(config_token) endif Plus a recipe for config_token, and some dependencies on it.
Diffstat (limited to 'repo/www/helpers.py')
-rw-r--r--repo/www/helpers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/repo/www/helpers.py b/repo/www/helpers.py
index 434ef6c..f76fa02 100644
--- a/repo/www/helpers.py
+++ b/repo/www/helpers.py
@@ -1,7 +1,7 @@
from collections import defaultdict
from dataclasses import dataclass, field
from itertools import chain
-from os import path
+from os import environ, path
from subprocess import run
from typing import Iterator
@@ -67,4 +67,5 @@ def pandoc(page, output, template, filters, title=None, site_title=None):
if site_title is not None:
cmd += ('-T', site_title)
+ environ['LUA_PATH'] = '.cache/?.lua;;'
run(cmd, check=True)