Get rid of the "misc" page. Just put it on the front page.
This commit is contained in:
@@ -78,8 +78,8 @@ def markdown_to_html(input_file, output_dir):
|
||||
relpath = os.path.relpath(input_file, start=common)
|
||||
|
||||
# Special cases
|
||||
if relpath == 'site/misc/index.md':
|
||||
top = read(input_file)
|
||||
if relpath == 'site/index.md':
|
||||
input_base = read(input_file)
|
||||
|
||||
pages = []
|
||||
for path, subdirs, subfiles in os.walk(site_dir):
|
||||
@@ -97,7 +97,7 @@ def markdown_to_html(input_file, output_dir):
|
||||
pages.append((dir + '/' + uri,
|
||||
os.path.normpath(os.path.join(base_dir, path, name))))
|
||||
|
||||
builtins = ['/', '/about/', '/about/niels', '/misc/', '/404']
|
||||
builtins = ['/', '/about/', '/about/niels', '/404']
|
||||
pages = filter(lambda t: t[0] not in builtins, pages)
|
||||
pages_new = []
|
||||
for page in pages:
|
||||
@@ -116,8 +116,7 @@ def markdown_to_html(input_file, output_dir):
|
||||
pabstract = '(No description)'
|
||||
md += '[{}]({})\n ~ {}\n\n'.format(ptitle, url, pabstract)
|
||||
|
||||
bottom = md
|
||||
content = pandoc_stdin(top + '\n' + bottom)
|
||||
content = pandoc_stdin(input_base.replace('SPECIAL:ARTICLES', md))
|
||||
else:
|
||||
content = pandoc(input_file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user