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

8
archetypes/now.md Normal file
View File

@@ -0,0 +1,8 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
specialpost: true
type: now
summary: Here I write what I'm working or studing for now {{ replace .Name "-" " " | title }}
---

View File

@@ -19,6 +19,10 @@ main:
name: "Series"
url: "/series"
weight: 27
- pageRef: "/now"
name: "Now"
url: "/now"
weight: 28
- pageRef: "/explore"
name: "Explore"
url: "/explore"

View File

@@ -29,3 +29,5 @@ The code for this website is hosted on [GitHub](https://github.com/fundor333/fun
Some part (some of the static pages) of this site are generated from api, some mine, some from external service and some from json files generated by some of mine [Github automation](https://fundor333.com/post/2025/github-action-for-syndication-links/).
The comments are done with [webmentions](https://indieweb.org/Webmention) and hosted with the [Github automation](https://fundor333.com/post/2025/github-action-for-syndication-links/) in the [repo](https://github.com/fundor333/fundor333.github.io) with all other file needed to build the site.
The [now page](https://nownownow.com/about) is make with [this article](https://derekkedziora.com/blog/dynamic-now-page) in mind and I edit every time I remember to update it.

View File

@@ -1,17 +1,10 @@
---
title: "Now"
type: page
title: "2025 04 15"
specialpost: true
allpage: true
date: 2000-08-20T12:00:00+02:00
outputs:
- 'html'
date: 2025-04-15T12:00:00+02:00
type: now
summary: Here I write what I'm working or studing for now
---
This is my now page, and if you have your own site, [you should make one too](https://nownownow.com/about).
Here I write what I'm working or studing for now:
## Web
* [Fundor333](https://fundor333.com) - This blog make with Hugo and love. The Css framework change somethime. Now it's boostrap 4 with font awesome

9
content/now/_index.md Normal file
View File

@@ -0,0 +1,9 @@
---
title: "Now"
specialpost: true
---
This is my now page, and if you have your own site, [you should make one too](https://nownownow.com/about).
This page is also made with [this article](https://derekkedziora.com/blog/dynamic-now-page) in mind.
Here I write what I'm working or studing for now:

26
layouts/now/list.html Normal file
View File

@@ -0,0 +1,26 @@
{{- define "main" -}}
<div class="wrapper list-page">
<header class="header">
<h1 class="header-title center">{{ .Title }}</h1>
</header>
<main class="page-content" aria-label="Content">
{{.Content}}
{{/* create a list of posts for each month, with month as heading */}}
{{ range $index, $element := .Pages.ByDate.Reverse }}
{{ if (eq $index 0) }}
{{ $element.Content}}
{{else}}
{{ partial "postCard" $element }}
{{ end }}
{{ end }} {{/* end range .Pages.ByDate */}}
</main>
{{- partial "syndication.html" . -}}
{{- partial "comments.html" . -}}
</div>
{{- end -}}

21
layouts/now/single.html Normal file
View File

@@ -0,0 +1,21 @@
{{ define "main" }}
<div class="wrapper post">
<main class="page-content" aria-label="Content">
<article class="h-entry post-entry">
<header class="header">
<h1 class="header-title p-name">{{ .Title }} <a href="/now/"><i class="fa-whiteboard fa-semibold fa-backward-step"></i></a></h1>
<div>
<a class="u-url" href="{{ .Permalink }}"><div style="display: none;" class="p-summary">{{ .Description }}</div></a>
<a rel="author" class="p-author h-card no-underline " href="{{ .Site.BaseURL }}" style="display: none;" >{{ .Site.Params.Author.name }}</a>
</div>
</header>
<div class="page-content e-content">
{{ .Content }}
</div>
{{- partial "syndication.html" . -}}
{{- partial "comments.html" . -}}
</article>
</main>
</div>
{{ end }}

View File

@@ -2,15 +2,17 @@
<h4 class="post-item-title">
<a href="{{ .RelPermalink }}">
{{if eq .Type "post" }}
<i class="fa-regular fa-newspaper"></i>
<i class="fa-whiteboard fa-semibold fa-newspaper fa-xl"></i>
{{ else if eq .Type "micro" }}
<i class="fa-regular fa-thought-bubble fa-flip-horizontal"></i>
<i class="fa-whiteboard fa-semibold fa-quotes fa-xl"></i>
{{ else if eq .Type "photos" }}
<i class="fa-regular fa-camera-retro"></i>
<i class="fa-whiteboard fa-semibold fa-camera fa-xl"></i>
{{ else if eq .Type "weeknote" }}
<i class="fa-kit fa-regular-bowl-chopsticks-noodles-at fa-xl"></i>
{{ else if eq .Type "now" }}
<i class="fa-whiteboard fa-semibold fa-skull fa-xl"></i>
{{ else }}
<i class="fa-duotone fa-solid fa-sushi"></i>
<i class="fa-whiteboard fa-semibold fa-ghost fa-xl"></i>
{{ end}}
{{ .Title }}</a>
</h4>

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)()

View File

@@ -98,3 +98,6 @@ precommit: ## Run pre-commit hooks
micro: ## Run microblog script
@poetry run python3 make-post.py micro
now: ## Run now script
@poetry run python3 make-post.py now

View File

@@ -1,50 +0,0 @@
{
"feeds": [
{
"url": "https://appletune.fundor333.com/api/feed/",
"title": "Suggested Reading Links/Posts",
"utm_source": "fundor333.com"
},
{
"url": "https://www.fundor333.com/index.xml",
"title": "New post from my blog",
"utm_source": "fundor333.com"
},
{
"url": "https://newsletter.digitaltearoom.com/rss/",
"title": "New post from my newsletter",
"utm_source": "fundor333.com"
}
],
"fix_links": [
{
"url": "https://www.fundor333.com",
"title": "My blog",
"utm_source": "fundor333.com"
},
{
"url": "https://newsletter.digitaltearoom.com",
"title": "My newsletter",
"utm_source": "fundor333.com"
},
{
"url": "https://ko-fi.com/fundor333",
"title": "Support me",
"utm_source": "fundor333.com"
}
],
"generator": {
"tag": "week note",
"output": "content/weeknotes/",
"fix_links_label": "My Links",
"type_weeknote": "weeknote",
"draft": false
},
"anilist": { "user_id": "fundor333" },
"goodread": {
"user_id": "5312887-matteo",
"shelf_name_code": "currently-reading",
"shelf_name_label": "Currently Reading"
},
"text_api": "https://appletune.fundor333.com/api/weekdone/?format=json"
}