forked from cadence/breezewiki
Rename config options to use underscores
Makes more sense for the INI.
This commit is contained in:
parent
a2ec8bb923
commit
cc138a07aa
4 changed files with 15 additions and 14 deletions
|
@ -26,7 +26,7 @@
|
|||
`(html
|
||||
(head
|
||||
(meta (@ (name "viewport") (content "width=device-width, initial-scale=1")))
|
||||
(title ,(format "~a | ~a" title (config-get 'application-name)))
|
||||
(title ,(format "~a | ~a" title (config-get 'application_name)))
|
||||
(style ":root { --theme-page-background-color: #dfdfe0 }") ; fallback in case styles don't load fast enough
|
||||
,@(map (λ (url)
|
||||
`(link (@ (rel "stylesheet") (type "text/css") (href ,url))))
|
||||
|
@ -53,22 +53,22 @@
|
|||
(img (@ (class "my-logo") (src "/static/breezewiki.svg"))))
|
||||
(p
|
||||
(a (@ (href "https://gitdab.com/cadence/breezewiki"))
|
||||
,(format "~a source code" (config-get 'application-name))))
|
||||
,(format "~a source code" (config-get 'application_name))))
|
||||
(p
|
||||
(a (@ (href "https://lists.sr.ht/~cadence/breezewiki-discuss"))
|
||||
"Discussions / Bug reports / Feature requests"))
|
||||
,(if (config-get 'instance-is-official)
|
||||
`(p ,(format "This instance is run by the ~a developer, " (config-get 'application-name))
|
||||
,(if (config-get 'instance_is_official)
|
||||
`(p ,(format "This instance is run by the ~a developer, " (config-get 'application_name))
|
||||
(a (@ (href "https://cadence.moe/contact"))
|
||||
"Cadence."))
|
||||
`(p
|
||||
,(format "This unofficial instance is based off the ~a source code, but is not controlled by the code developer." (config-get 'application-name)))))
|
||||
,(format "This unofficial instance is based off the ~a source code, but is not controlled by the code developer." (config-get 'application_name)))))
|
||||
(div
|
||||
(p "This page displays proxied content from "
|
||||
(a (@ (href ,source-url) (rel "noreferrer")) ,source-url)
|
||||
". Text content is available under the Creative Commons Attribution-Share Alike License 3.0 (Unported), "
|
||||
(a (@ (href "https://www.fandom.com/licensing")) "see license info.")
|
||||
" Media files may have different copying restrictions.")
|
||||
(p ,(format "Fandom is a trademark of Fandom, Inc. ~a is not affiliated with Fandom." (config-get 'application-name))))))))))))
|
||||
(p ,(format "Fandom is a trademark of Fandom, Inc. ~a is not affiliated with Fandom." (config-get 'application_name))))))))))))
|
||||
(module+ test
|
||||
(check-not-false (xexp->html (generate-wiki-page "" "test" "test" '(template)))))
|
||||
|
|
|
@ -16,10 +16,11 @@
|
|||
(hash-ref config key))
|
||||
|
||||
(define default-config
|
||||
'((port . "10416")
|
||||
'((application_name . "BreezeWiki")
|
||||
(canonical_origin . "")
|
||||
(debug . "false")
|
||||
(instance-is-official . "false") ; please don't turn this on, or you will make me very upset
|
||||
(application-name . "BreezeWiki")))
|
||||
(instance_is_official . "false") ; please don't turn this on, or you will make me very upset
|
||||
(port . "10416")))
|
||||
|
||||
(define config
|
||||
(make-hasheq
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
(define data (easy:response-json dest-res))
|
||||
(define body (generate-results-page dest-url wikiname prefixed-category data))
|
||||
(when (config-get 'debug)
|
||||
(when (config-true? 'debug)
|
||||
; used for its side effects
|
||||
; convert to string with error checking, error will be raised if xexp is invalid
|
||||
(xexp->html body))
|
||||
|
|
|
@ -56,20 +56,20 @@
|
|||
(footer (@ (class "custom-footer"))
|
||||
(div (@ (class "internal-footer"))
|
||||
(img (@ (class "my-logo") (src "/static/breezewiki.svg")))
|
||||
,(if (config-get 'instance-is-official)
|
||||
,(if (config-get 'instance_is_official)
|
||||
`(div
|
||||
(p ,(format "This instance is run by the ~a developer, " (config-get 'application-name))
|
||||
(p ,(format "This instance is run by the ~a developer, " (config-get 'application_name))
|
||||
(a (@ (href "https://cadence.moe/contact"))
|
||||
"Cadence."))
|
||||
(p "Hosting generously provided by "
|
||||
(a (@ (href "http://alphamethyl.barr0w.net/"))
|
||||
"alphamethyl.")))
|
||||
`(p
|
||||
,(format "This unofficial instance is based off the ~a source code, but is not controlled by the code developer." (config-get 'application-name))))
|
||||
,(format "This unofficial instance is based off the ~a source code, but is not controlled by the code developer." (config-get 'application_name))))
|
||||
(p "Text content on wikis run by Fandom is available under the Creative Commons Attribution-Share Alike License 3.0 (Unported), "
|
||||
(a (@ (href "https://www.fandom.com/licensing")) "see license info.")
|
||||
" Media files and official Fandom documents have different copying restrictions.")
|
||||
(p ,(format "Fandom is a trademark of Fandom, Inc. ~a is not affiliated with Fandom." (config-get 'application-name)))))))))))
|
||||
(p ,(format "Fandom is a trademark of Fandom, Inc. ~a is not affiliated with Fandom." (config-get 'application_name)))))))))))
|
||||
(module+ test
|
||||
(check-not-false (xexp->html body)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue