Live data from Hacker News

Link Blog in a Static Site

rednafi.com

11–19 of 19 posts

Re: Link Blog in a Static Site

#12
post #9
post #6

Earlier quoted context omitted.

This pattern of: 1. polling for external changes somewhere 2. updating some pages on a static site (by incorporating the changes from step 1) and rebuilding it is incredibly powerful. It allows us to make a static site behave almost like a read-only dynamic one. There needs to be a name for this—it’s hard to discuss it without one.

A bit like PESOS (Publish elsewhere, syndicate own site). I do this when archiving my Mastodon posts in my own static site [0]. [0]: https://garrido.io/notes/archiving-and-syndicating-mastodon-...

PESOS is pretty good. I was aware of POSSE but not PESOS.

Re: Link Blog in a Static Site

#13
post #7
post #6

Earlier quoted context omitted.

This pattern of: 1. polling for external changes somewhere 2. updating some pages on a static site (by incorporating the changes from step 1) and rebuilding it is incredibly powerful. It allows us to make a static site behave almost like a read-only dynamic one. There needs to be a name for this—it’s hard to discuss it without one.

This pattern is used all over the place, and for good reason (especially when people get their minds on combining CI/CD and static deployments). Simon Willison groked the name « Baked Data »: even though it was in the context of Datasette (which requires a backend to run but the SQLite db is embedded and read-only), it is pretty safe the term can be applied for static websites also!

Hasn't it already had a name for years? A headless CMS

Re: Link Blog in a Static Site

#14

On my personal site (also built with Hugo) I post images of food I have eaten and media I have consumed. I could use Instagram, Bluesky or X but I want the content to be mine and stay mine. And I am doing it because I like to blog things not because I want the interaction on social media. https://www.planetjones.net/food.html https://www.planetjones.net/reviews.html

Where did you settle on for your image hosting? I like GH Pages and Hugo, but it feels dirty to put images in a git repository. At the same time, GitHub does allow 5GB per repo, so I'm torn.

Re: Link Blog in a Static Site

#15

On my personal site (also built with Hugo) I post images of food I have eaten and media I have consumed. I could use Instagram, Bluesky or X but I want the content to be mine and stay mine. And I am doing it because I like to blog things not because I want the interaction on social media. https://www.planetjones.net/food.html https://www.planetjones.net/reviews.html

Where did you settle on for your image hosting? I like GH Pages and Hugo, but it feels dirty to put images in a git repository. At the same time, GitHub does allow 5GB per repo, so I'm torn.

I use Cloudflare R2, which is free for up to 1 million writes and 10 million reads per month with no egress costs.

I also use Hugo and GitHub Pages for their simplicity. I wrote about this setup here[1].

[1]: https://rednafi.com/misc/behind_the_blog/

Re: Link Blog in a Static Site

#16
post #4

Earlier quoted context omitted.

Yeah, the whole point of this is tracking the progress of something, not vanity interaction. This is why I decided to leave it out of the main RSS feed to avoid spamming readers.

So... you want to use your blog as some kind of a log ported to the web? Yeah, most tools are built to support something different.

Not the entire blog, just a single page, yes.

Re: Link Blog in a Static Site

#17
post #6
post #5

I generate the Bookmarks [1] section of my static site from the public bookmarks in my Pinboard account. Since I host with Netlify, I've written a lightweight Netlify function that looks at my Pinboard account for changes. If there are changes, it simply re-runs the static site build. During the build, Lektor, the static site generator, runs a custom plugin I've written that generates the link blog page from the Pinb…

This pattern of: 1. polling for external changes somewhere 2. updating some pages on a static site (by incorporating the changes from step 1) and rebuilding it is incredibly powerful. It allows us to make a static site behave almost like a read-only dynamic one. There needs to be a name for this—it’s hard to discuss it without one.

Fetch?

Re: Link Blog in a Static Site

#18

On my personal site (also built with Hugo) I post images of food I have eaten and media I have consumed. I could use Instagram, Bluesky or X but I want the content to be mine and stay mine. And I am doing it because I like to blog things not because I want the interaction on social media. https://www.planetjones.net/food.html https://www.planetjones.net/reviews.html

Where did you settle on for your image hosting? I like GH Pages and Hugo, but it feels dirty to put images in a git repository. At the same time, GitHub does allow 5GB per repo, so I'm torn.

I am user of dreamhost so the images get stored there. I wrote about my set-up on my blog.

https://www.planetjones.net/blog/03-05-2023/relaunching-my-p...

Re: Link Blog in a Static Site

#19
post #6
post #5

I generate the Bookmarks [1] section of my static site from the public bookmarks in my Pinboard account. Since I host with Netlify, I've written a lightweight Netlify function that looks at my Pinboard account for changes. If there are changes, it simply re-runs the static site build. During the build, Lektor, the static site generator, runs a custom plugin I've written that generates the link blog page from the Pinb…

This pattern of: 1. polling for external changes somewhere 2. updating some pages on a static site (by incorporating the changes from step 1) and rebuilding it is incredibly powerful. It allows us to make a static site behave almost like a read-only dynamic one. There needs to be a name for this—it’s hard to discuss it without one.

Why is that not just 'transclusion' https://en.wikipedia.org/wiki/Transclusion ?

Except a special-case of transclusion: high latency and compile-time only. As opposed to doing it with JS dynamically; if Pinboard had an API, or even simply doesn't block frames with HTTP headers, you could simply dynamically call from the static site page to the other site, load the relevant HTML, and present it transcluded into the static site page. (This is how Gwern.net does a lot of stuff: everything from the Wikipedia/Github popups to transcluding other pages.)

Post reply on HN