diff --git a/docs.scrbl b/docs.scrbl index 1fcd15d..132078c 100644 --- a/docs.scrbl +++ b/docs.scrbl @@ -27,14 +27,26 @@ @subsection{Mirrors} +@(define (mirrors-file-table onion?) + (for/list ([item (with-input-from-file "files/instances.json" (lambda () (read-json)))] + #:when (eq? onion? (regexp-match? #rx"\\.onion" (hash-ref item 'instance)))) + (define-values (owner-name owner-website instance) + (apply values (for/list ([key '(owner_name owner_website instance)]) + (hash-ref item key)))) + (list (if (string? owner-website) (hyperlink owner-website owner-name) owner-name) + (if onion? (hyperlink instance "Visit onion site") (url instance))))) + @tabular[#:style (style "user-table instance-list user-table--title" null) `((,(literal "Hoster") ,(literal "Link")) - ,@(for/list ([item (with-input-from-file "files/instances.json" (lambda () (read-json)))]) - (define-values (owner-name owner-website instance) - (apply values (for/list ([key '(owner_name owner_website instance)]) - (hash-ref item key)))) - (list (if (string? owner-website) (hyperlink owner-website owner-name) owner-name) - (url instance))))] + ,@(mirrors-file-table #f))] + +@subsection{Onion Mirrors} + +Please note: You need the @hyperlink["https://www.torproject.org/" "Tor browser"] to see these. + +@tabular[#:style (style "user-table instance-list user-table--title" null) + `((,(literal "Hoster") ,(literal "Link")) + ,@(mirrors-file-table #t))] @hyperlink["https://docs.breezewiki.com/files/instances.json" "Machine-readable data"] diff --git a/files/instances.json b/files/instances.json index 8f47051..63c6bf6 100644 --- a/files/instances.json +++ b/files/instances.json @@ -9,5 +9,7 @@ {"owner_name": "Whatever Social", "owner_website": "https://whatever.social", "instance": "https://nerd.whatever.social"}, {"owner_name": "Frontend Friendly", "owner_website": "https://frontendfriendly.xyz", "instance": "https://breezewiki.frontendfriendly.xyz"}, {"owner_name": "nohoster", "owner_website": "mailto:admin@nohost.network", "instance": "https://breeze.nohost.network"}, - {"owner_name": "WhateverItWorks", "owner_website": "https://www.whateveritworks.org", "instance": "https://breeze.whateveritworks.org"} + {"owner_name": "WhateverItWorks", "owner_website": "https://www.whateveritworks.org", "instance": "https://breeze.whateveritworks.org"}, + {"owner_name": "Opnxng", "owner_website": "https://about.opnxng.com", "instance": "https://z.opnxng.com"}, + {"owner_name": "lost+skunk", "owner_website": "https://matrix.to/#/@softpigeones:sibnsk.net", "instance": "http://bw.skunky7dhv7nohsoalpwe3sxfz3fbkad7r3wk632riye25vqm3meqead.onion"} ]