werc.cat-v.org: document duckduckgo app

This commit is contained in:
khm 2020-06-09 23:01:19 -07:00
parent b522533954
commit 6afcf7d75b
2 changed files with 40 additions and 3 deletions

View File

@ -33,8 +33,7 @@ fn wercpaste_init {
} }
fn begforpaste { fn begforpaste {
echo '<h1>Pastebin</h1> echo '<article class="pastebox">
<article>
<h3 style="text-align: center">pasted data is not publically indexed</h3> <h3 style="text-align: center">pasted data is not publically indexed</h3>
<form action="'$paste_url'" method="post" style="margin:2em"> <form action="'$paste_url'" method="post" style="margin:2em">
<textarea name="paste" cols="120" rows="20" required style="display: block; margin: 0 auto 0 auto" ></textarea><br> <textarea name="paste" cols="120" rows="20" required style="display: block; margin: 0 auto 0 auto" ></textarea><br>
@ -44,4 +43,3 @@ fn begforpaste {
</article> </article>
' '
} }

View File

@ -0,0 +1,39 @@
duckduckgo - Simple sitesearch using DuckDuckGo.com
===================================
duckduckgo is a very simple app that allows you to redirect a path
(by default /_search/) to a query to duckduckgo.com restricted to
your site.
Currently, to change that path requires editing the app. In the
future, the path will be a configuration option.
Configuration
-------------
First, create the search path and the _werc directory under it:
; mkdir -p /www/werc/sites/MYSITE/_search/_werc/
Then, enable the duckduckgo app in that directory:
echo 'conf_enable_duckduckgo' > /www/werc/sites/MYSITE/_search/_werc/config
Next, deploy the search form somewhere on your site. This example puts
it in your footer:
mkdir -p /www/werc/sites/MYSITE/_werc/lib/
cp /www/werc/apps/search/footer.inc.sample /www/werc/sites/MYSITE/_werc/lib/footer.inc
Demo
----
For a demo of this app, see the footer of your favorite cat-v.org site.
TODO
----
* 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