]> git.plutz.net Git - shellwiki/commitdiff
variable theming
authorPaul Hänsch <paul@plutz.net>
Thu, 19 May 2022 14:34:35 +0000 (16:34 +0200)
committerPaul Hänsch <paul@plutz.net>
Thu, 19 May 2022 14:34:35 +0000 (16:34 +0200)
handlers/10_page.sh
handlers/30_edit.sh
index.cgi

index 004dd03ced270f3b524b2b0b33b9ed07c75c7791..186b705715231a31c290e5d66dbaac1fe58cb6c9 100755 (executable)
@@ -1,11 +1,8 @@
 #!/bin/sh
 
-CACHE_AGE=${CACHE_AGE:-1800}
+CACHE_AGE=${CACHE_AGE:-300}
 export MD_MACROS="$_EXEC/macros"
 export MD_HTML="${MD_HTML:-false}"
-export WIKI_THEME=${WIKI_THEME:-default}
-
-. "$_EXEC/themes/${WIKI_THEME}.sh"
 
 wiki() {
   # Print content of a wiki page
index 60b1b25e1089a35eddbfc558afec209c83362c54..aa55796ccce501fae8af249458bbef2513ee5994 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/sh
 
-. "${_EXEC}/themes/default.sh"
 . "${_EXEC}/session_lock.sh"
 
 wiki_text() {
index 8975ccaa0cc1b2b6e76d4f8d13474648ca0d1311..57398a4ff7f9aabc4879b9a2b20cfb5b3b6dcb94 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -2,11 +2,13 @@
 
 . "${_EXEC:-${0%/*}}/cgilite/cgilite.sh"
 . "${_EXEC}/cgilite/session.sh"
-. "${_EXEC}/cgilite/file.sh"
 . "${_EXEC}/cgilite/users.sh"
 . "${_EXEC}/tools.sh"
 . "${_EXEC}/acl.sh"
 
+WIKI_THEME="${WIKI_THEME:-default}"
+. "${_EXEC}/themes/${WIKI_THEME}.sh"
+
 wiki_text() {
   # Print source text of a wiki page
   # Get page from data or underlay dir