diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-04-25 23:51:27 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-04-25 23:51:27 +0200 |
| commit | c6f09513154c18076ec4d1150cabe0a22d83314a (patch) | |
| tree | 00a5e9cb564f74720a092044fd75a8ef1db23775 /repo/www/generate-index.py | |
| parent | 8692dba921531783b9204a9323db2aba640fe978 (diff) | |
| download | memory-leaks-c6f09513154c18076ec4d1150cabe0a22d83314a.tar.xz | |
Remove redundant title prefix on top-level index
Diffstat (limited to 'repo/www/generate-index.py')
| -rwxr-xr-x | repo/www/generate-index.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/repo/www/generate-index.py b/repo/www/generate-index.py index 62daf79..1fb00e6 100755 --- a/repo/www/generate-index.py +++ b/repo/www/generate-index.py @@ -17,7 +17,7 @@ def parse_arguments(): 'site_tree', help='JSON file describing the page tree.' ) parser.add_argument( - 'site_title', help='Title to add to <title>.' + '--site-title', help='Prefix to add to <title>.' ) parser.add_argument( 'target', help='Subfolder to generate an index for.' @@ -97,10 +97,11 @@ def format_index(target, directories, files): def convert_page(content, output, site_title): - run( - ('pandoc', '-s', '-o', output, '-T', site_title), - input=content, check=True, text=True - ) + pandoc = ('pandoc', '-s', '-o', output) + if site_title is not None: + pandoc += ('-T', site_title) + + run(pandoc, input=content, check=True, text=True) def main(arguments): |
