Introduction
Introduction Statistics Contact Development Disclaimer Help
Add sample 'hello world' app and enabled_apps config variable. - swerc - anselm…
git clone git://git.suckless.org/swerc
Log
Files
Refs
README
---
commit 0c00e1902839472f2ba3fbc0937e137d9ddb18d6
parent 48f24a1ee2e1aeed36c9aed1c8ec590455a9a0c4
Author: [email protected] <unknown>
Date: Sun, 21 Dec 2008 09:37:40 +0100
Add sample 'hello world' app and enabled_apps config variable.
Diffstat:
A apps/hello/app.rc | 12 ++++++++++++
M bin/cgilib.rc | 5 +----
M etc/initrc | 3 +++
3 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/apps/hello/app.rc b/apps/hello/app.rc
@@ -0,0 +1,12 @@
+fn hello_test {
+ ~ $req_path /hello
+}
+
+fn hello_setup {
+ app_body_handler = 'hello_body'
+ pageTitle='Hi title!'
+}
+
+fn hello_body {
+ echo 'Hello world!'
+}
diff --git a/bin/cgilib.rc b/bin/cgilib.rc
@@ -261,12 +261,9 @@ fn gen_blog_post_title {
###################################
# App framework
-
-app_list=( hello )
-
fn select_apps {
found=()
- for(a in $app_list) {
+ for(a in $enabled_apps) {
. ./apps/$a/app.rc
if($a^'_test') {
$a^'_setup'
diff --git a/etc/initrc b/etc/initrc
@@ -28,6 +28,9 @@ formatter=(fproc_cache.rc markdown.pl)
# Enable debugging, to disable set to ()
debug=true
+# Globablly enabled apps
+#enabled_apps=( hello )
+
# Default site variables, must be set in initrc.local or _werc/config, only si…
#masterSite=cat-v.org # Not required!
#siteTitle='cat-v'
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.