diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-08-19 00:10:08 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-08-19 00:10:08 +0200 |
| commit | 30e831c9602ea5d4d0603f5ad03baff481771b4b (patch) | |
| tree | 7548cd29ed5ecf3e975df5a2e6ae130ae488f36f /repo/www/helpers.py | |
| parent | 338f941477ef6815bd4638bf166f1fddb5a4b3d3 (diff) | |
| download | memory-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.py | 3 |
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) |
