Skip to content

Proposal: Nostr Backend Integration for Hugo #13974

@delirehberi

Description

@delirehberi

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:

  1. Users add their nsec and npub keys to the Hugo configuration file.

  2. Hugo scans posts/*.md files for Nostr metadata (e.g., nostr_id: XXX).

    • If nostr_id exists, the post is already published to Nostr, so Hugo will render it as usual.
    • If nostr_id does not exist, Hugo will publish the post to Nostr and render it normally.
  3. 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 .md file with the nostr_id metadata.
  4. On the blog post detail page, it will be possible to include an njump.me link to the content.

  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions