# 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 1. Clone the repository 2. Install Go dependencies: ```bash go mod tidy ``` 3. Install Node.js dependencies: ```bash npm install @asciidoctor/core ``` Or globally: ```bash npm install -g @asciidoctor/core ``` 4. Download nostr-tools bundle (for contact form): ```bash mkdir -p static/js curl -L -o static/js/nostr.bundle.js https://unpkg.com/nostr-tools@latest/lib/nostr.bundle.js ``` Note: The nostr-tools library is hosted locally to avoid dependency on external CDNs. 5. Copy the example config: ```bash cp config.yaml.example config.yaml ``` 6. Edit `config.yaml` with 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 ```bash go run cmd/server/main.go ``` Or build and run: ```bash go build -o gitcitadel-online cmd/server/main.go ./gitcitadel-online ``` Development mode with verbose logging: ```bash 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/` - 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