From d7d98af0080241600bf0198f5c0942c96f3d2f95 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Tue, 24 Mar 2020 22:32:55 +0100 Subject: Distinguish indices from regular pages So that I can add a special recipe for them, where I'll concatenate the directory index. --- repo/www/make-deps.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'repo/www/make-deps.py') 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) -- cgit v1.2.3