Fix linking to blog articles from index.
This commit is contained in:
parent
59c9dfcf6b
commit
6275fc3694
2 changed files with 6 additions and 3 deletions
|
@ -207,6 +207,7 @@ def render_index(docs, dest_top):
|
|||
"post_publication_date": front_matter['date'],
|
||||
"post_tags": split_tags(front_matter['tags']),
|
||||
"summary": summarize(doc),
|
||||
"link": out_path.rstrip('/') + '/',
|
||||
}
|
||||
for (doc, front_matter, out_path) in page
|
||||
]
|
||||
|
@ -232,7 +233,9 @@ def regen_all(source_top, dest_top, docs=None):
|
|||
doc_full_path = os.path.join(dest_top, out_path)
|
||||
os.makedirs(os.path.dirname(doc_full_path), exist_ok=True)
|
||||
# print("==", doc_full_path)
|
||||
with open(doc_full_path + '.html', 'wt') as f:
|
||||
out_path = doc_full_path + '/index.html'
|
||||
os.makedirs(os.path.dirname(out_path), exist_ok=True)
|
||||
with open(out_path, 'wt') as f:
|
||||
try:
|
||||
render_article(doc, front_matter, f)
|
||||
except:
|
||||
|
@ -325,7 +328,7 @@ def main(source_top, dest_top):
|
|||
doc_full_path = os.path.join(dest_top, out_path)
|
||||
os.makedirs(os.path.dirname(doc_full_path), exist_ok=True)
|
||||
# print("==", doc_full_path)
|
||||
with open(doc_full_path + '.html', 'wt') as f:
|
||||
with open(doc_full_path + '/index.html', 'wt') as f:
|
||||
try:
|
||||
render_article(doc, front_matter, f)
|
||||
except:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue