Adds "Now" page functionality

Implements a "Now" page to share current activities, inspired by nownownow.com.

- Introduces a new content type "now" with corresponding layouts and archetype.
- Adds a "Now" entry to the main menu.
- Creates a script to easily generate new "now" entries.
- Updates the colophon page with information about the "now" page.
- Deletes weeknote config as it isn't in use anymore
This commit is contained in:
fundor333
2025-08-05 02:49:10 +02:00
parent 7f3aa3ec77
commit f86b05b476
11 changed files with 95 additions and 65 deletions

View File

@@ -74,12 +74,24 @@ def weeklycover():
generate_img(file_string, f"weeknotes/{year}/{week}")
def now_fc():
print("Make a now")
year = str(datetime.datetime.now().year).rjust(4, "0")
month = str(datetime.datetime.now().month).rjust(2, "0")
day = str(datetime.datetime.now().day).rjust(2, "0")
generated = f"{year}/{month}/{day}"
os.system(f"hugo new now/{generated}/{year}-{month}-{day}.md")
print(f"Generated {generated}/index.md")
ANSWER = {
"post": post_fc,
"micro": micro_fc,
"photo": post_photo,
"redirect": post_redirect,
"weekly_cover": weeklycover,
"now": now_fc,
}
@@ -92,7 +104,7 @@ def main_checker():
def main(text: Annotated[str, typer.Argument()] = None):
if text is None:
text = input(
"You need a new [post], a new [photo], a new [micro] or [weekly_cover]\n"
"You need a new [post], a new [photo], a new [micro], a [weekly_cover] or [now]\n"
)
ANSWER.get(text, main)()