|
|
|
|
|
|
|
|
published = [note for note in unpublished if not note.is_draft] |
|
|
published = [note for note in unpublished if not note.is_draft] |
|
|
for previous, note, next_ in neighborhood(unpublished, last=notes_2018): |
|
|
for previous, note, next_ in neighborhood(unpublished, last=notes_2018): |
|
|
if note.is_draft: |
|
|
if note.is_draft: |
|
|
print(f"Soon: http://larlet.test:8001{note.url} ({note.title})") |
|
|
|
|
|
|
|
|
print(f"Soon: http://larlet.test:3579{note.url} ({note.title})") |
|
|
# Detect if there is code for syntax highlighting + monospaced font. |
|
|
# Detect if there is code for syntax highlighting + monospaced font. |
|
|
has_code = "<code>" in note.content |
|
|
has_code = "<code>" in note.content |
|
|
# Do not link to unpublished notes. |
|
|
# Do not link to unpublished notes. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
page_archive = template_archives.render(note_list=published) |
|
|
page_archive = template_archives.render(note_list=published) |
|
|
open(note_base / "index.html", "w").write(page_archive) |
|
|
open(note_base / "index.html", "w").write(page_archive) |
|
|
print(f"Done: http://larlet.test:8001/{note_base}/") |
|
|
|
|
|
|
|
|
print(f"Done: http://larlet.test:3579/{note_base}/") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@cli |
|
|
@cli |
|
|
|
|
|
|
|
|
if post.date.year < 2018: |
|
|
if post.date.year < 2018: |
|
|
continue # Speed up + do not overwrite old comments. |
|
|
continue # Speed up + do not overwrite old comments. |
|
|
if post.is_draft: |
|
|
if post.is_draft: |
|
|
print(f"Soon: http://larlet.test:8001{post.url} ({post.title})") |
|
|
|
|
|
|
|
|
print(f"Soon: http://larlet.test:3579{post.url} ({post.title})") |
|
|
# Detect if there is code for syntax highlighting + monospaced font. |
|
|
# Detect if there is code for syntax highlighting + monospaced font. |
|
|
has_code = "<code>" in post.content |
|
|
has_code = "<code>" in post.content |
|
|
# Do not link to unpublished posts. |
|
|
# Do not link to unpublished posts. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
page_archive = template_archives.render(posts=published, note_list=note_list) |
|
|
page_archive = template_archives.render(posts=published, note_list=note_list) |
|
|
open(post_base / "index.html", "w").write(page_archive) |
|
|
open(post_base / "index.html", "w").write(page_archive) |
|
|
print(f"Done: http://larlet.test:8001/{post_base}/") |
|
|
|
|
|
|
|
|
print(f"Done: http://larlet.test:3579/{post_base}/") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@cli |
|
|
@cli |