diff --git a/archetypes/now.md b/archetypes/now.md new file mode 100644 index 00000000..42d63421 --- /dev/null +++ b/archetypes/now.md @@ -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 }} +--- + diff --git a/config/_default/menu.yaml b/config/_default/menu.yaml index debb6578..8a243f91 100644 --- a/config/_default/menu.yaml +++ b/config/_default/menu.yaml @@ -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" diff --git a/content/colophon.md b/content/colophon.md index 4e96714b..3bd84148 100644 --- a/content/colophon.md +++ b/content/colophon.md @@ -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. diff --git a/content/now.md b/content/now/2025/04/15/2025-04-15.md similarity index 87% rename from content/now.md rename to content/now/2025/04/15/2025-04-15.md index fb8ea0b8..8f871fa4 100644 --- a/content/now.md +++ b/content/now/2025/04/15/2025-04-15.md @@ -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 diff --git a/content/now/_index.md b/content/now/_index.md new file mode 100644 index 00000000..100bdac5 --- /dev/null +++ b/content/now/_index.md @@ -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: diff --git a/layouts/now/list.html b/layouts/now/list.html new file mode 100644 index 00000000..22d51702 --- /dev/null +++ b/layouts/now/list.html @@ -0,0 +1,26 @@ +{{- define "main" -}} +
+
+

{{ .Title }}

+
+
+ + {{.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 */}} +
+ {{- partial "syndication.html" . -}} + {{- partial "comments.html" . -}} +
+ +{{- end -}} diff --git a/layouts/now/single.html b/layouts/now/single.html new file mode 100644 index 00000000..0dc6ef07 --- /dev/null +++ b/layouts/now/single.html @@ -0,0 +1,21 @@ +{{ define "main" }} +
+
+ +
+
+{{ end }} diff --git a/layouts/partials/postCard.html b/layouts/partials/postCard.html index 91617229..7ae9a2b2 100644 --- a/layouts/partials/postCard.html +++ b/layouts/partials/postCard.html @@ -2,15 +2,17 @@

{{if eq .Type "post" }} - + {{ else if eq .Type "micro" }} - + {{ else if eq .Type "photos" }} - + {{ else if eq .Type "weeknote" }} + {{ else if eq .Type "now" }} + {{ else }} - + {{ end}} {{ .Title }}

diff --git a/make-post.py b/make-post.py index 2b558171..f0ced88d 100644 --- a/make-post.py +++ b/make-post.py @@ -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)() diff --git a/makefile b/makefile index 848eb4ae..94b4c4fd 100644 --- a/makefile +++ b/makefile @@ -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 diff --git a/weeknote-config.json b/weeknote-config.json deleted file mode 100644 index b13b888e..00000000 --- a/weeknote-config.json +++ /dev/null @@ -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" -}