Hugo to Nostr Publisher simplifies the process of publishing blog posts from a Hugo site to the Nostr network. It features support for various markdown formats, automatic normalization of tags and dates, and includes tools for debugging and managing published content. This tool enhances the flexibility and visibility of blogs on decentralized platforms.
The Hugo to Nostr Publisher project provides a robust solution for effortlessly publishing Hugo blog posts to the Nostr network as kind:30023 (Article) events. This tool not only allows users to track published posts but also enables management of deletions, making it an essential companion for bloggers transitioning to decentralized networks. Debug tools are included for inspecting events on relays.
content/posts/*.md directly to Nostr.---) and TOML (+++).delete: true in the frontmatter.To tailor the project to specific needs, configure it using environment variables in a .env file or export them directly. An example configuration might look like:
POSTS_DIR="FULLPATH_PROJECT_DIR/content/posts"
RELAY_LIST="wss://relay.emre.xyz"
DRY_RUN=1
NOSTR_PRIVATE_KEY="nsecXXX"
Load these variables automatically with dotenv or export them as needed in your shell.
Publish Posts (index.js)
npm run publish
npm run dry-run
Fetch Existing Articles (debug.js)
kind:30023 articles using:npm run debug
Delete Articles (delete.js)
npm run delete
npm run dry-runnpm run publishnpm run debugnpm run delete-allnpm run deletenpm run syncnpm run update.env support)Contributions are welcomed. Users can open issues or submit pull requests for enhancements or bug fixes.
No comments yet.
Sign in to be the first to comment.