From: Paul Hänsch Date: Thu, 19 May 2022 14:34:35 +0000 (+0200) Subject: variable theming X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=1861b7d2167a225930ff04d38d5d835a98c5d5c5;p=shellwiki variable theming --- diff --git a/handlers/10_page.sh b/handlers/10_page.sh index 004dd03..186b705 100755 --- a/handlers/10_page.sh +++ b/handlers/10_page.sh @@ -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 diff --git a/handlers/30_edit.sh b/handlers/30_edit.sh index 60b1b25..aa55796 100755 --- a/handlers/30_edit.sh +++ b/handlers/30_edit.sh @@ -1,6 +1,5 @@ #!/bin/sh -. "${_EXEC}/themes/default.sh" . "${_EXEC}/session_lock.sh" wiki_text() { diff --git a/index.cgi b/index.cgi index 8975cca..57398a4 100755 --- 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