-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Description
I've got help from chatgpt to polish my issue.
Description:
Hi, I’ve been a Hugo user for a long time emre.xyz and am currently writing a script to move my Hugo content to Nostr as articles. I also plan to create a static page to fetch and display those articles.
I’d like to propose adding Nostr backend support to Hugo. This feature would enable Hugo users to publish and sync content with the Nostr network directly.
Proposed Workflow:
-
Users add their nsec and npub keys to the Hugo configuration file.
-
Hugo scans
posts/*.mdfiles for Nostr metadata (e.g.,nostr_id: XXX).- If
nostr_idexists, the post is already published to Nostr, so Hugo will render it as usual. - If
nostr_iddoes not exist, Hugo will publish the post to Nostr and render it normally.
- If
-
Hugo checks relays for articles associated with the configured
npub.- If an article exists on Nostr but does not have a local Markdown file, Hugo fetches the article and saves it as an
.mdfile with thenostr_idmetadata.
- If an article exists on Nostr but does not have a local Markdown file, Hugo fetches the article and saves it as an
-
On the blog post detail page, it will be possible to include an njump.me link to the content.
-
Future enhancement: fetch Nostr comments and display them inside Hugo blog posts.
Next Steps:
I am willing to implement this feature if there is interest from the community. A 👍 on this issue would be enough to approve moving forward.