From 9cb56dabb676391a9382731347e8d2b07b9437a5 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Sun, 7 Apr 2024 13:25:49 +0200 Subject: big cleanup --- apps/duckduckgo/HOWTO | 20 -------------------- apps/duckduckgo/app.rc | 30 ------------------------------ apps/duckduckgo/footer.inc.sample | 3 --- 3 files changed, 53 deletions(-) delete mode 100644 apps/duckduckgo/HOWTO delete mode 100755 apps/duckduckgo/app.rc delete mode 100644 apps/duckduckgo/footer.inc.sample (limited to 'apps/duckduckgo') diff --git a/apps/duckduckgo/HOWTO b/apps/duckduckgo/HOWTO deleted file mode 100644 index 8bb952c..0000000 --- a/apps/duckduckgo/HOWTO +++ /dev/null @@ -1,20 +0,0 @@ -The default path for site search is /_search/. Assuming you want to keep -that default, you could enable site search like so: - - -mkdir -p /www/werc/sites/MYSITE/_search/_werc/ -echo 'conf_enable_duckduckgo' > /www/werc/sites/MYSITE/_search/_werc/config -mkdir -p /www/werc/sites/MYSITE/_werc/lib/ -cp /www/werc/apps/duckduckgo/footer.inc.sample /www/werc/sites/MYSITE/_werc/lib/footer.inc - -Searches will POST to /_search/ and from there get redirected to Duck Duck -Go with a site:$SERVER_NAME prefix. To have the search path URL be some- -thing different, you'll have to edit line 23 of app.rc to point to the new -path. - -TODO: -* Make it automatically work no matter which directory the app is enabled in. -* OR make the search path a configuration option. -* Provide a template for non-footer deployment -* Enable the search path itself to serve a search form to GET requests - diff --git a/apps/duckduckgo/app.rc b/apps/duckduckgo/app.rc deleted file mode 100755 index 72dd0ec..0000000 --- a/apps/duckduckgo/app.rc +++ /dev/null @@ -1,30 +0,0 @@ -fn conf_enable_duckduckgo { - enable_duckduckgo=yes - conf_enable_app duckduckgo - pageTitle='Site Search' -} - - -fn duckduckgo_init { - get_post_args q - if (! ~ $#q 0) { - redirect_string = 'https://duckduckgo.com/?q=site:'$SERVER_NAME^'+'^$"q - http_redirect $redirect_string '302 Found' - } - if not { - handler_body_main='duckduckgo_body' - } -} - -fn duckduckgo_body { - echo ' -

Site search

-

using DuckDuckGo

-
- - - -
' - -} - diff --git a/apps/duckduckgo/footer.inc.sample b/apps/duckduckgo/footer.inc.sample deleted file mode 100644 index 4dd671d..0000000 --- a/apps/duckduckgo/footer.inc.sample +++ /dev/null @@ -1,3 +0,0 @@ -
Powered by werc
- -
-- cgit v1.2.3