You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.7 KiB
2.7 KiB
GitCitadel Online
A server-generated website that fetches kind 30818 wiki events from Nostr relays, processes AsciiDoc content, and serves professional HTML pages with caching.
Features
- Fetches wiki content from Nostr relays (kind 30818 events)
- Processes AsciiDoc content to HTML
- Caches all pages for fast serving
- Background cache rewarming to keep content fresh
- Kind 1 feed integration in sidebar
- SEO optimized with structured data
- Responsive design with medium-dark theme
- WCAG AA/AAA compliant accessibility
- YAML configuration for easy index management
Requirements
- Go 1.22+
- Node.js (for asciidoctor.js)
- @asciidoctor/core npm package
- Network access to Nostr relays
Installation
- Clone the repository
- Install Go dependencies:
go mod tidy - Install Node.js dependencies:
Or globally:npm install @asciidoctor/corenpm install -g @asciidoctor/core - Download nostr-tools bundle (for contact form):
Note: The nostr-tools library is hosted locally to avoid dependency on external CDNs.mkdir -p static/js curl -L -o static/js/nostr.bundle.js https://unpkg.com/nostr-tools@latest/lib/nostr.bundle.js - Copy the example config:
cp config.yaml.example config.yaml - Edit
config.yamlwith your indices and settings
Configuration
Edit config.yaml to set:
wiki_index: naddr for your wiki index (kind 30040)blog_index: naddr for your blog index (kind 30040)- Relay URLs
- Cache refresh intervals
- Server port
- SEO settings
Running
go run cmd/server/main.go
Or build and run:
go build -o gitcitadel-online cmd/server/main.go
./gitcitadel-online
Development mode with verbose logging:
go run cmd/server/main.go --dev
Project Structure
gitcitadel-online/
├── cmd/server/ # Main server application
├── internal/
│ ├── nostr/ # Nostr client and event parsing
│ ├── asciidoc/ # AsciiDoc processing
│ ├── generator/ # HTML generation
│ ├── cache/ # Caching layer
│ ├── server/ # HTTP server
│ └── config/ # Configuration management
├── templates/ # HTML templates
├── static/ # Static assets (CSS, images)
└── config.yaml # Configuration file
API
The server provides:
/- Landing page/wiki/<d-tag>- Wiki article pages/blog- Blog index page/static/- Static assets/health- Health check endpoint/metrics- Metrics endpoint/sitemap.xml- Sitemap/robots.txt- Robots.txt
License
MIT License - see LICENSE.md