diff --git a/generate.py b/generate.py index 85a1a6c..c8bff2a 100755 --- a/generate.py +++ b/generate.py @@ -27,10 +27,13 @@ for root, dirs, files in os.walk(input_, topdown=True): shutil.copy(templates + '/stylesheet.css', outroot + '/stylesheet.css') + outfiles = [] + for file in files: if file.endswith('.md'): basename = file[:-3] outfile = outroot + '/' + basename + '.html' + outfiles.append(basename + '.html') infile = root + '/' + file with open(infile, 'r') as f: @@ -43,3 +46,17 @@ for root, dirs, files in os.walk(input_, topdown=True): content=content) f.write(new_file) + + index_html = '' + + with open(outroot + '/index.html', 'w') as f: + f.write(render_template(title=outroot, + content=index_html)) diff --git a/templates/stylesheet.css b/templates/stylesheet.css index 762eab3..1bd70a2 100644 --- a/templates/stylesheet.css +++ b/templates/stylesheet.css @@ -1,3 +1,3 @@ body { - background-color: blue + background-color: yellow }