From 5574954beba9df9ea87d1d30f0b916d6e56dc6b8 Mon Sep 17 00:00:00 2001 From: nebula Date: Tue, 8 Apr 2025 04:46:21 +0000 Subject: [PATCH] enhance pages with info about atom feed --- README.md | 10 +++++----- generate.py | 7 +++++++ style.css | 6 ++++++ templates/atom_page | 41 +++++++++++++++++++++++++++++++++++++++++ templates/main | 5 ++++- 5 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 templates/atom_page diff --git a/README.md b/README.md index 30fd342..44098a9 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ the files. As such, there is no server code here. This site tries to be as simple as possible. There's some css that makes it look better, and some dependancy-free javascript that manages the image browsing -experience once an album is opened. The whole thing has been written by me from -scratch, mostly for my own learning purposes. While it may be a little too fancy -to truly adhere to [smolweb principles](https://smolweb.org/), I deeply admire -that movement and similar ethos carried by communities like -[tilde.town](https://tilde.town). +experience once an album is opened. The whole thing has been written by me, +mostly from scratch aside from a few helpful python libraries, for my own +educational purposes. While it may be a little too fancy to truly adhere to +[smolweb principles](https://smolweb.org/), I deeply admire that movement and +similar ethos carried by communities like [tilde.town](https://tilde.town). I created this website as a loveletter to the American west and the immense time I spent exploring it. It is made to share beauty as I have experienced it, and diff --git a/generate.py b/generate.py index a6406ea..6cfa883 100644 --- a/generate.py +++ b/generate.py @@ -209,6 +209,13 @@ def render_atom(): entry.description(header) entry.content(md_from_code(post_code), type="html") feed.atom_file(out_dir + "feed_html.atom") + template = template_environment.get_template("atom_page") + with open(f"{out_dir}feeds.html", "w") as f: + f.write(template.render({ + "last_post_code": posts_sorted[-1], + "metadata": metadata + })) + def copy_files(): call(f"cp js/* {out_dir}js/", shell=True) diff --git a/style.css b/style.css index 5f9a803..c7cae05 100644 --- a/style.css +++ b/style.css @@ -29,6 +29,12 @@ h1, h3 { text-align: center; } +/* for the atom feed page */ + +.linkToIndex { + text-align: center; +} + /* in-album image browser */ .galleryContainer { diff --git a/templates/atom_page b/templates/atom_page new file mode 100644 index 0000000..e45a90b --- /dev/null +++ b/templates/atom_page @@ -0,0 +1,41 @@ + + + + + + + nebula's atom feed + + + + + +
+

+ i take pictures +

+
+
+

+ Return to Index +

+
+

+

See me in your feed reader!

+ You may subscribe to my posts using your favorite feed reader. This feed + does not include galleries without stories written for them, so you can use + this to keep track of new stories as I write them. Autodiscovery is enabled, + so you should be able to just point your reader at + https://helixnebula.space/ and let the app discover the feed URL for you. + Just in case, here is the feed url: +

+

+ https://helixnebula.space/feed_html.atom +

+

+ Last updated page: {{ metadata[last_post_code]["title"] }} +

+
+
+ + diff --git a/templates/main b/templates/main index a022565..4a73463 100644 --- a/templates/main +++ b/templates/main @@ -7,6 +7,7 @@ nebula's photoblog +
@@ -45,7 +46,9 @@ {% endfor %}

Photos are licensed under CC BY-NC-SA 4.0 -
Powered by free and open source software.

+
Powered by free and open source software +
Subscribe to this site with your feed reader +