From 1861b7d2167a225930ff04d38d5d835a98c5d5c5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 19 May 2022 16:34:35 +0200 Subject: [PATCH] variable theming --- handlers/10_page.sh | 5 +---- handlers/30_edit.sh | 1 - index.cgi | 4 +++- 3 files changed, 4 insertions(+), 6 deletions(-) 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 -- 2.39.2