-
@ dhalsim
2025-04-26 23:33:16- Demo: https://blog.nostrize.me
- Source code: nostr-static
Prerequisites
Before using nostr-static, you'll need:
- Nostr Articles: You can either:
- Create new articles using platforms like yakihonne.com or habla.news
- Find existing articles on Nostr
-
Copy the naddr string from the article (usually can be found in the address bar)
-
Author Profiles: For each article's author:
- Copy their public key (pubkey)
- Visit njump.me/npub1xxxxx (replace with the actual pubkey)
- Copy the nprofile string from the page
These identifiers (naddr for articles and nprofile for authors) are essential for the tool to fetch and display your content correctly.
Features
Core Functionality
- Index Page: A homepage featuring your blog's title, logo, article summaries, and tags
- Article Pages: Individual pages for each article, including:
- Title and logo
- Article summary
- Full content
- Tags
- Comments (via ZapThreads integration)
Social Features
- Comments: Integrated with ZapThreads for decentralized commenting
- Nostr Connect: Seamless integration with window.nostr.js (wnj), supporting NIP-46 bunker connect
Content Organization
- Tag Pages: Browse articles filtered by specific tags
- Profile Pages: View articles from specific authors
- Manual Curation: Select and order articles by adding their naddr strings (see NIP-19)
Customization Options
- Themes: Choose between dark and light mode
- Branding:
- Custom logo
- Custom blog title
- Network: Specify your preferred Nostr relays
Technical Requirements
- Profile Format: Authors must be added in nprofile format (see NIP-19) for consistency
- Automatic Updates: Built-in scripts for:
- Windows Task Scheduler
- Unix/Linux cron jobs
Getting Started
- Fork and Clone:
- Fork this repository to your GitHub account
- Clone it to your local machine or use GitHub Codespaces for a cloud-based development environment
-
Watch this quick tutorial to learn more about GitHub Codespaces
-
Configuration: Set up your
config.yaml
file with: - Blog title and logo
- Theme preference
- Relay list
- Article naddr strings
-
Author nprofile strings
-
Content Selection: Add your desired articles by including their naddr strings in the configuration
-
Author Selection: You have to add the nprofile strings of the articles. This is needed for URL consistancy.
-
Build & Run: Follow the instruction in the README at https://github.com/dhalsim/nostr-static
-
Deployment: Choose your preferred static hosting service and deploy the generated HTML files
-
Updates: Set up automatic updates using the provided scripts for your operating system (For github pages)
Deployment Options
GitHub Pages (Recommended)
GitHub Pages provides free hosting for static websites. Here's how to set it up:
- Enable GitHub Pages:
- Go to your repository's Settings
- Navigate to "Pages" in the menu
- Under "Build and deployment" > "Source", select "GitHub Actions"
- Enable Actions by following the GitHub Actions settings guide
-
Go to the "Actions" tab in the top menu. If you see the message "Workflows aren't being run on this forked repository", click the "I understand my workflows, go ahead and enable them" button
-
Custom Domain Setup:
- Purchase a domain from your preferred domain registrar
- Create a CNAME record in your domain's DNS settings:
- Type: CNAME
- Name: @ or www or a subdomain you prefer (depending on your preference)
- Value: YOUR_GITHUB_USERNAME.github.io
- In your repository's GitHub Pages settings:
- Enter your custom domain in the "Custom domain" field
- Check "Enforce HTTPS" for secure connections
- Wait for DNS propagation (can take up to 24 hours)
- Your site will be available at your custom domain
Other Hosting Options
You can also deploy your static site to any hosting service that supports static websites, such as: - Netlify - Vercel - Cloudflare Pages - Amazon S3 - Any traditional web hosting service
Why nostr-static?
nostr-static offers a unique solution for bloggers who want to leverage Nostr's decentralized content while maintaining a traditional web presence. It combines the best of both worlds:
- Decentralized Content: Your articles live on the Nostr network
- Traditional Web Presence: A familiar blog interface for your readers
- Easy Maintenance: Simple configuration and automatic updates
- Flexible Hosting: Deploy anywhere that supports static websites
- Social interactions: Leverage nostr for comments
Conclusion
nostr-static makes it easy to create a professional blog from your Nostr long-form content. Whether you're a seasoned Nostr user or new to the ecosystem, this tool provides a straightforward way to share your content with both the Nostr community and traditional web users.
Start your Nostr-powered blog today by visiting the demo and exploring the possibilities!