summaryrefslogtreecommitdiff
path: root/repo/www
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-03-24 22:32:55 +0100
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-03-24 22:33:31 +0100
commitd7d98af0080241600bf0198f5c0942c96f3d2f95 (patch)
tree3bcc152fc868fb81a99b788c4a58784d60dcab19 /repo/www
parent4cd45bc0721a3af07142bb3a62c6fc518bad5aec (diff)
downloadmemory-leaks-d7d98af0080241600bf0198f5c0942c96f3d2f95.tar.xz
Distinguish indices from regular pages
So that I can add a special recipe for them, where I'll concatenate the directory index.
Diffstat (limited to 'repo/www')
-rw-r--r--repo/www/Makefile4
-rwxr-xr-xrepo/www/make-deps.py6
2 files changed, 7 insertions, 3 deletions
diff --git a/repo/www/Makefile b/repo/www/Makefile
index e7d5184..38a28d2 100644
--- a/repo/www/Makefile
+++ b/repo/www/Makefile
@@ -18,12 +18,12 @@ include $(dependencies)
$(dependencies): make-deps.py $(text_folders)
python3 $< "$(TEXT_FILES)" $(OUT_DIR)
-site: $(pages) $(autoindices)
+site: $(pages) $(indices) $(autoindices)
$(page_folders):
mkdir -p $@
-$(pages):
+$(pages) $(indices):
pandoc -s $< -o $@
# ⚠ When tweaking this rule, check whether it still works for the
diff --git a/repo/www/make-deps.py b/repo/www/make-deps.py
index b7c71d7..d88d333 100755
--- a/repo/www/make-deps.py
+++ b/repo/www/make-deps.py
@@ -37,6 +37,7 @@ def pjoin(directory, item):
def write_dependencies(deps_file, directories, top_dir, out_dir):
pages = list()
+ indices = list()
autoindices = list()
for dpath, d in directories.items():
@@ -49,17 +50,19 @@ def write_dependencies(deps_file, directories, top_dir, out_dir):
name, _ = path.splitext(f)
deps = [src_path]
+ target = pages
if name == 'README':
name = 'index'
deps.append(src_dir)
+ target = indices
autoindex = False
html_dir = pjoin(out_dir, dpath)
html_path = path.join(html_dir, name+'.html')
print(f'{html_path}: {" ".join(deps)} | {html_dir}', file=deps_file)
- pages.append(html_path)
+ target.append(html_path)
if autoindex:
autoindices.append(
@@ -68,6 +71,7 @@ def write_dependencies(deps_file, directories, top_dir, out_dir):
print(file=deps_file)
print(f'pages = {" ".join(pages)}', file=deps_file)
+ print(f'indices = {" ".join(indices)}', file=deps_file)
print(f'autoindices = {" ".join(autoindices)}', file=deps_file)