From 68832059bd121ea55d4c6bf7bcf4f988a4693e77 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Mon, 5 Sep 2022 01:45:42 +1200 Subject: [PATCH] Display canonical_origin on the home page --- src/page-home.rkt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/page-home.rkt b/src/page-home.rkt index 760ac17..27cdd2e 100644 --- a/src/page-home.rkt +++ b/src/page-home.rkt @@ -1,6 +1,7 @@ #lang racket/base -(require html-writing +(require net/url + html-writing web-server/http "xexpr-utils.rkt" "config.rkt") @@ -31,7 +32,10 @@ ,(apply format "~a: ~a" x)))) examples)) (h2 "How to use") - (p "While browsing any page on Fandom, you can replace \"fandom.com\" in the address bar with \"breezewiki.com\" to see the BreezeWiki version of that page.") + (p ,(format "While browsing any page on Fandom, you can replace \"fandom.com\" in the address bar with \"~a\" to see the BreezeWiki version of that page." + (if (config-true? 'canonical_origin) + (url-host (string->url (config-get 'canonical_origin))) + "breezewiki.com"))) (p "After that, you can click the links to navigate around the pages.") (p "To get back to Fandom, click the link that's at the bottom of the page.")))