Commit 79b2cc2e authored by ammongit's avatar ammongit

Add <tt> for index pages.

parent e87f7239
......@@ -31,6 +31,7 @@ OUTPUT_DIR = 'output'
INDEX_FILENAME = 'index.html'
INDEX_OUTPUT_FILENAME = 'index-{}.html'
INDEX_NUMBER_TEMPLATE = '<tt>{}</tt>'
INDEX_TEMPLATE_HTML_PATH = 'index-template.html'
ENTRY_TEMPLATE_HTML_PATH = 'entry-template.html'
......@@ -135,12 +136,13 @@ def write_index(number, posts, output_path, page_count):
# Format page links
pages_parts = []
for i in range(page_count):
page = INDEX_NUMBER_TEMPLATE.format(i + 1)
if i == number:
pages_parts.append('<b>{}</b>'.format(i + 1))
pages_parts.append('<b>{}</b>'.format(page))
else:
pages_parts.append('<a href="{}">{}</a>'.format(
INDEX_OUTPUT_FILENAME.format(i),
i + 1,
page,
))
# Format HTML for the full index
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment