swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit ea0d2cc4fd35ebf761c2771c59c1f6d44eeae7e9
parent 4ac83e6f4a816bd9e63c1bc7f22f086dca4216a6
Author: Anselm R Garbe <anselm@garbe.us>
Date:   Mon, 18 Apr 2011 14:05:37 +0000

my initial modifications
Diffstat:
Dapps/bridge/app.rc | 103-------------------------------------------------------------------------------
Dapps/bridge/comments_list.tpl | 13-------------
Dapps/bridge/foot.tpl | 37-------------------------------------
Dapps/dirdir/app.rc | 40----------------------------------------
Dapps/dirdir/edit.tpl | 25-------------------------
Dapps/dirdir/sidebar_controls.tpl | 3---
Dapps/hello/app.rc | 10----------
Mbin/corehandlers.rc | 22++++++++++++++--------
Rsites/CREATE-SITE-DIRECTORIES-HERE -> etc/initrc.local | 0
Mlib/404.tpl | 9---------
Mlib/default_master.tpl | 52+++++++++++++++++++++++++++++++---------------------
Dlib/footer.inc | 6------
Mlib/headers.tpl | 35+++++++----------------------------
Dlib/top_bar.inc | 16----------------
Dpub/style/imgs/sgl.png | 0
Dpub/style/sinorca-screen-alt.css | 293-------------------------------------------------------------------------------
Mpub/style/style.css | 482+++++++++++++++++++++++++------------------------------------------------------
Dpub/style/style_old.css | 330-------------------------------------------------------------------------------
Dsites/default.cat-v.org/_werc/lib/footer.inc | 29-----------------------------
Dsites/default.cat-v.org/_werc/lib/headers.inc | 4----
Dsites/default.cat-v.org/_werc/lib/top_bar.inc | 25-------------------------
Dsites/tst.cat-v.org/_werc/config | 2--
Dsites/tst.cat-v.org/apps/blagh/_werc/config | 3---
Dsites/tst.cat-v.org/apps/bridge/a/_werc/config | 1-
Dsites/tst.cat-v.org/index.md | 4----
Dsites/tst.cat-v.org/titles/dashed-title.md | 3---
Dsites/tst.cat-v.org/titles/under_title.md | 3---
Dsites/werc.cat-v.org/_werc/config | 7-------
Dsites/werc.cat-v.org/apps/_footer.md | 10----------
Dsites/werc.cat-v.org/apps/_header.md | 5-----
Dsites/werc.cat-v.org/apps/blagh/index.md | 59-----------------------------------------------------------
Dsites/werc.cat-v.org/apps/bridge/index.md | 13-------------
Dsites/werc.cat-v.org/apps/dirdir/index.md | 41-----------------------------------------
Dsites/werc.cat-v.org/apps/wman/index.md | 34----------------------------------
Dsites/werc.cat-v.org/development/index.md | 21---------------------
Dsites/werc.cat-v.org/development/roadmap.md | 62--------------------------------------------------------------
Dsites/werc.cat-v.org/development/todo.md | 75---------------------------------------------------------------------------
Dsites/werc.cat-v.org/docs/_werc/config | 1-
Dsites/werc.cat-v.org/docs/config-options.md | 60------------------------------------------------------------
Dsites/werc.cat-v.org/docs/css-style.md | 18------------------
Dsites/werc.cat-v.org/docs/dir-listings.md | 29-----------------------------
Dsites/werc.cat-v.org/docs/rc-template-lang.md | 56--------------------------------------------------------
Dsites/werc.cat-v.org/docs/site-customization.md | 50--------------------------------------------------
Dsites/werc.cat-v.org/docs/user-management.md | 36------------------------------------
Dsites/werc.cat-v.org/docs/web-server-setup/_header.md | 16----------------
Dsites/werc.cat-v.org/docs/web-server-setup/apache.md | 92-------------------------------------------------------------------------------
Dsites/werc.cat-v.org/docs/web-server-setup/cherokee.md | 31-------------------------------
Dsites/werc.cat-v.org/docs/web-server-setup/hiawatha.md | 16----------------
Dsites/werc.cat-v.org/docs/web-server-setup/lighttpd.md | 44--------------------------------------------
Dsites/werc.cat-v.org/docs/web-server-setup/nginx.md | 96-------------------------------------------------------------------------------
Dsites/werc.cat-v.org/docs/web-server-setup/nhttpd.md | 60------------------------------------------------------------
Dsites/werc.cat-v.org/docs/web-server-setup/plan-9-httpd.md | 53-----------------------------------------------------
Dsites/werc.cat-v.org/index.md | 104-------------------------------------------------------------------------------
Dsites/werc.cat-v.org/testimonials.md | 8--------
Dsites/werc.cat-v.org/wiki/_werc/config | 1-
55 files changed, 204 insertions(+), 2444 deletions(-)

diff --git a/apps/bridge/app.rc b/apps/bridge/app.rc @@ -1,103 +0,0 @@ -comment_file_types=(md html) - -fn conf_enable_comments { - if(~ $1 -n) { - allow_new_user_comments=yes - shift - } - if not if(~ $1 -a) { - bridge_anon_comments=yes - } - enable_comments=yes - groups_allowed_comments=$* - conf_enable_app bridge -} - -fn bridge_init { - if(~ $#enable_comments 1 && ! ~ `{ls $local_path.$comment_file_types >[2]/dev/null|wc -l} 0) { - - comments_dir=$sitedir$req_path'_werc/comments' - if(~ $REQUEST_METHOD GET && test -d $comments_dir) - ll_add handlers_body_foot template apps/bridge/comments_list.tpl - - if(check_user $groups_allowed_comments || {~ $#logged_user 0 && ~ 1 $#allow_new_user_comments $#bridge_anon_comments}) { - - if(~ $#post_arg_bridge_post 1) { - ll_add handlers_body_foot template apps/bridge/foot.tpl - - if(mk_new_comment $comments_dir) - post_redirect $base_url^$req_path - if not - saved_comment_text=$post_arg_comment_text - } - if not if(~ $REQUEST_METHOD GET) - ll_add handlers_body_foot template apps/bridge/foot.tpl - } - if not if(~ $REQUEST_METHOD GET) - ll_add handlers_body_foot echo '<hr><p>To post a comment you need to <a href="/_users/login">login</a> first.</p>' - } -} - -fn validate_new_user { - usr=$1; pass=$2; pass2=$3 - _status=() - - if(~ $"usr '' || ! echo $usr |sed 1q|grep -s '^'$allowed_user_chars'+$') - _status='Requested user name is invalid, must match: '^$allowed_user_chars^'+' - if not if(test -d etc/users/$usr) - _status='Sorry, user name '''^$usr^''' already taken, please pick a different one.' - - if(~ $"pass '' || ! ~ $"pass $"pass2) - _status=($_status 'Provided passwords don''t match.') - - status=$_status -} - - -fn mk_new_comment { - _status=() - dir=$1 - if(~ $"post_arg_comment_text '') - _status='Provide a comment!' - if not if(~ $#logged_user 0) { - if(! ~ $#allow_new_user_comments 0) { - if(validate_new_user $"post_arg_comment_user $post_arg_comment_passwd $post_arg_comment_passwd2) { - u=$post_arg_comment_user':'$post_arg_comment_passwd - dir=$comments_dir^'_pending' - # XXX: This doesn't work because we then do a redirect. - notify_notes='Saved comment and registration info, they will be enabled when approved by an admin.' - } - if not - _status=$status - } - if not if(! ~ $#bridge_anon_comments 0) { - if(~ $"post_arg_ima_robot 'not') - u='Glenda' # Anonymous - if not - _status='You are a robot!' - } - if not - _status='You need to log in to comment.' - } - if not if(check_user $groups_allowed_comments) - u=$logged_user - if not - _status='You are not a member of a group allowed to comment.' - - if(~ $#_status 0) { - umask 002 - - dir=$dir'/'`{date -n} # FIXME Obvious race - mkdir -m 775 -p $dir && - echo $u > $dir/user && - echo $current_date_time > $dir/posted && - echo $post_arg_comment_text > $dir/body - _s=$status - if(! ~ $"_s '') { - dprint 'ERROR XXX: Could not create comment: ' $_s - _status='Could not post comment due internal error, sorry.' - } - } - notify_errors=$_status - status=$_status -} diff --git a/apps/bridge/comments_list.tpl b/apps/bridge/comments_list.tpl @@ -1,13 +0,0 @@ -<hr> -<h2>Comments</h2> - -% for(c in `{ls $comments_dir/}) { -% if(test -s $c/body) { - <div class="comment"> - <h5>By: <i>%(`{cat $c/user}%)</i></b> (%(`{cat $c/posted}%)) - </h5> -% cat $c/body | escape_html | sed 's,$,<br>,' - <hr></div> -% } -% } - diff --git a/apps/bridge/foot.tpl b/apps/bridge/foot.tpl @@ -1,37 +0,0 @@ -<hr> - -% notices_handler -<form action="" method="post"> - <textarea name="comment_text" id="comment_text" cols="80" rows="16">%($"saved_comment_text%)</textarea> - <br> - <input type="submit" name="bridge_post" value="Post a comment"> - -% if(~ $#logged_user 0) { -% if(~ $#allow_new_user_comments 1) { - <label>New user name: - <input type="text" name="comment_user" value="%($"post_arg_comment_user%)"> - </label> - - <label>Password: - <input type="password" name="comment_passwd" value=""> - </label> - - <label>Repeat password: - <input type="password" name="comment_passwd2" value=""> - </label> - <div style="font-size: 70%"> - Enter your desired user name/password and after your comment has been reviewed by an admin it will be posted and your account will be enabled. If you are already registered please <a href="/_users/login">login</a> before posting. - </div> -% } -% if not if(~ $#bridge_anon_comments 1) { - <label>Is <a href="http://glenda.cat-v.org">Glenda a cute bunny</a>? - <select name='ima_robot'> - <option value="yes">No</option> - <option value="not">Yes</option> - <option value="foobar">I hate bunnies!</option> - <option value="robot">I'm a robot!</option> - </select> - </label> -% } -% } -</form> diff --git a/apps/dirdir/app.rc b/apps/dirdir/app.rc @@ -1,40 +0,0 @@ -fn conf_enable_wiki { - enable_wiki=yes - wiki_editors_groups=$* - conf_enable_app dirdir -} - -fn dirdir_init { - if(! ~ $#enable_wiki 0 && check_user $wiki_editors_groups) { - lp=$local_path - # werc.rc doesn't append /index when $local_path doesn't exit - # maybe it should, but for now we can fix it up here. - if(~ $lp */) - lp=$lp^'index' - dirdir_file=$lp.md - dirdir_dir=$dirdir_file^'_werc/dirdir/' - - if(~ 1 $#post_arg_dirdir_edit $#post_arg_dirdir_preview) - handler_body_main=(tpl_handler `{get_lib_file dirdir/edit.tpl apps/dirdir/edit.tpl}) - - if not if(! ~ '' $"post_arg_dirdir_save $"post_arg_edit_text) - save_page - - if not if(~ $"handler_body_main '' || {~ $REQUEST_METHOD GET && test -f $local_path.md}) - ll_add handlers_bar_left tpl_handler apps/dirdir/sidebar_controls.tpl - } -} - -fn save_page { - dirdir_verdir=$dirdir_dir/^`{date -n}^/ - mkdir -p $dirdir_verdir - umask 002 - - # XXX Use a tmp file and mv(1) to ensure updates are atomic? - echo $logged_user > $dirdir_verdir/author - echo $post_arg_edit_text > $dirdir_verdir/data - echo $post_arg_edit_text > $dirdir_file - - post_redirect $base_url^$req_path - #notify_notes='Saved <a href="'$"req_path'">'$"req_path'</a>!' -} diff --git a/apps/dirdir/edit.tpl b/apps/dirdir/edit.tpl @@ -1,25 +0,0 @@ -<div> - <h1>Editing: <a href="%($req_path%)">%($req_path%)</a></h1> - <br> - <form action="" method="POST"> - <textarea name="edit_text" id="edit_text" cols="80" rows="43">%{ -# FIXME Extra trailing new lines get added to the content somehow, should avoid it. - if(~ $#post_arg_edit_text 0 && test -f $dirdir_file) - cat $dirdir_file | escape_html - if not - echo -n $post_arg_edit_text | escape_html - - %}</textarea> - <br> - <input type="submit" name="dirdir_save" value="Save"> - <input type="submit" name="dirdir_preview" value="Preview"> - <small>DirDir documents are written using <a href="http://daringfireball.net/projects/markdown/syntax">Markdown syntax</a>.</small> - </form> -</div> - -% if(! ~ $"post_arg_dirdir_preview '') { - <h2>Preview:</h2> - <div id="preview"> -% echo $post_arg_edit_text | $formatter - </div> -% } diff --git a/apps/dirdir/sidebar_controls.tpl b/apps/dirdir/sidebar_controls.tpl @@ -1,3 +0,0 @@ -<form action="" method="POST"> -<input type="submit" name="dirdir_edit" value="Edit page" /> -</form> diff --git a/apps/hello/app.rc b/apps/hello/app.rc @@ -1,10 +0,0 @@ -fn hello_init { - if(~ $req_path /hello) { - handler_body_main='hello_body' - pageTitle='Hi title!' - } -} - -fn hello_body { - echo 'Hello world!' -} diff --git a/bin/corehandlers.rc b/bin/corehandlers.rc @@ -1,8 +1,12 @@ # Werc builtin handlers fn nav_tree { - if(! ~ $#sideBarNavTitle 0) - echo '<p class="sideBarTitle">'$"sideBarNavTitle':</p>' + + echo '<ul>' + if(~ $"req_paths_list /) + echo '<li><a href="/" class="current">Home</a></li>' + if not + echo '<li><a href="/">Home</a></li>' # Ignore stderr, last path element might be a file that doesn't exist (eg., foo for foo.md) # /./ to deal with p9p's ls failure to follow dir symlinks otherwise ls -F $sitedir/./$req_paths_list >[2]/dev/null \ @@ -11,15 +15,15 @@ fn nav_tree { if(! ~ $#synth_paths 0) echo $synth_paths | tr ' ' $NEW_LINE } | sort -u | awk -F/ ' function p(x, y, s) { for(i=0; i < x-y; i+=1) print s } - BEGIN { lNF=2; print "<ul>" } + BEGIN { lNF=2; } { d = "" if(match($0, "/$")) d = "/" sub("/$", "") # Strip trailing / for dirs so NF is consistent - p(NF, lNF, "<li><ul>") - p(lNF, NF, "</ul></li>") + print "<li>"; + p(NF, lNF, "&nbsp;") lNF = NF bname = $NF d @@ -31,11 +35,13 @@ fn nav_tree { gsub(/[^\/]$/, "&/", pa) if(index(ENVIRON["req_path"] "/", pa) == 1) - print "<li><a href=\"" path "\" class=\"thisPage\">&raquo;<i> " bname "</i></a></li>" + print "<a href=\"" path "\" class=\"current\">" bname "</a>" else - print "<li><a href=\"" path "\">&rsaquo; " bname "</a></li>" + print "<a href=\"" path "\">" bname "</a>" + + print "</li>" } - END { p(lNF, 2, "</ul></li>"); print "</ul>" }' + END { print "</ul>" }' } fn link_bar { diff --git a/sites/CREATE-SITE-DIRECTORIES-HERE b/etc/initrc.local diff --git a/lib/404.tpl b/lib/404.tpl @@ -1,12 +1,3 @@ <h1>The requested document at '<i>%($base_url$"req_path%)</i>' doesn't exist</h1> -% # Google Enhanced 404 pages: http://www.google.com/support/webmasters/bin/answer.py?answer=93644 -<script type="text/javascript"> - var GOOG_FIXURL_LANG = 'en'; - var GOOG_FIXURL_SITE = '%($base_url%)/'; -</script> -<script type="text/javascript" - src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script> - <h4>Or take a look at the <a href="/sitemap">sitemap</a>.</h4> -<hr> diff --git a/lib/default_master.tpl b/lib/default_master.tpl @@ -1,26 +1,26 @@ -<div id="header"> - <div class="superHeader"> -% cat `{ get_lib_file top_bar.inc } - </div> - - <div class="midHeader"> - <h1 class="headerTitle"><a href="/">%($"siteTitle%) <span id="headerSubTitle">%($"siteSubTitle%)</span></a></h1> - </div> - - <div class="subHeader"><br></div> -</div> +<!-- + <div id="offsite"> + <a class="current" href="http://garbe.us">Home</a> + <a href="http://blog.garbe.us">Blog</a> + </div> +--> + <div id="innerbody"> + + <div id="header"> + <a href="/">%($"siteTitle%) <span id="headerSubTitle">%($"siteSubTitle%)</span></a> + </div> + + <div id="content"> % if(! ~ $#handlers_bar_left 0) { - <div id="side-bar"> + <div id="nav"> % for(h in $handlers_bar_left) { - <div> % run_handler $$h - </div> % } - </div> + </div> % } -<div id="main-copy"> + <div id="main"> % run_handlers $handlers_body_head @@ -28,8 +28,18 @@ % run_handlers $handlers_body_foot -</div> - -<div id="footer"> -% cat `{ get_lib_file footer.inc } -</div> + </div> + </div> + + <div id="footer"> + <div class="left"> + <a href="http://werc.cat-v.org/">Powered by werc</a> + </div> + <div class="right"> + &copy; 2011 Anselm R Garbe + </div> + </div> + + </div> +</body> +</html> diff --git a/lib/footer.inc b/lib/footer.inc @@ -1,6 +0,0 @@ -<div class="left"><a href="http://werc.cat-v.org/">Powered by werc</a></div> -<!-- TODO Maybe should add a programatically generated google search box --> -<div class="right"><a href="/_users/login">User Login</a></div> - -<br> -<br class="doNotDisplay doNotPrint"> diff --git a/lib/headers.tpl b/lib/headers.tpl @@ -1,29 +1,8 @@ -<!DOCTYPE HTML> +<!doctype html> <html> -<head> - - <title>%($pageTitle%)</title> - - <link rel="stylesheet" href="/pub/style/style.css" type="text/css" media="screen, handheld" title="default"> - <link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon"> -% if(test -f $sitedir/_werc/pub/style.css) -% echo ' <link rel="stylesheet" href="/_werc/pub/style.css" type="text/css" media="screen" title="default">' - - <meta charset="UTF-8"> -% # Legacy charset declaration for backards compatibility with non-html5 browsers. - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> - -% if(! ~ $#meta_description 0) -% echo ' <meta name="description" content="'$"meta_description'">' -% if(! ~ $#meta_keywords 0) -% echo ' <meta name="keywords" content="'$"meta_keywords'">' - -% h = `{get_lib_file headers.inc} -% if(! ~ $#h 0) -% cat $h - - %($"extraHeaders%) - -</head> -<body> - +<head> + <title>%($pageTitle%)</title> + <link href='http://fonts.googleapis.com/css?family=Cantarell' rel='stylesheet' type='text/css'> + <link rel="stylesheet" href="/pub/style/style.css" type="text/css"> + <meta charset="utf-8"> +</head> diff --git a/lib/top_bar.inc b/lib/top_bar.inc @@ -1,16 +0,0 @@ - <div class="left"> - <a href="http://gsoc.cat-v.org">gsoc</a> | - <a href="http://doc.cat-v.org">doc archive</a> | - <a href="http://repo.cat-v.org">software repo</a> | - <a href="http://ninetimes.cat-v.org">ninetimes</a> | - <a href="http://harmful.cat-v.org">harmful</a> | - <a href="http://9p.cat-v.org/">9P</a> | - <a href="http://cat-v.org">cat-v.org</a> - </div> - - <div class="right"> - <span class="doNotDisplay">Related sites:</span> - | <a href="http://cat-v.org/update_log">site updates</a> - | <a href="/sitemap">site map</a> - </div> - diff --git a/pub/style/imgs/sgl.png b/pub/style/imgs/sgl.png Binary files differ. diff --git a/pub/style/sinorca-screen-alt.css b/pub/style/sinorca-screen-alt.css @@ -1,292 +0,0 @@ -/*********************************************** - * TITLE: Sinorca Alterative Screen Stylesheet * - * URI : sinorca/sinorca-screen-alt.css * - * MODIF: 2003-May-13 18:48 +0800 * - ***********************************************/ - - -/* ##### Common Styles ##### */ - -body { - color: black; - background-color: white; - font-family: verdana, helvetica, arial, sans-serif; - font-size: 71%; /* Enables font size scaling in MSIE */ - margin: 0; - padding: 0; -} - -html > body { - font-size: 8.5pt; -} - -acronym, .titleTip { - border-bottom: 1px dotted rgb(153,153,153); - cursor: help; - margin: 0; - padding: 0 0 0.4px 0; -} - -.doNotDisplay { - display: none; -} - -.smallCaps { - font-size: 110%; - font-variant: small-caps; -} - - -/* ##### Header ##### */ - -.superHeader { - color: white; - background-color: rgb(100,135,220); - height: 2em; -} - -.superHeader a { - color: white; - background-color: transparent; - text-decoration: none; - font-size: 91%; - margin: 0; - padding: 0 0.5ex 0 0.25ex; -} - -.superHeader a:hover { - text-decoration: underline; -} - -.superHeader .left { - position: absolute; - left: 1.5mm; - top: 0.75ex; -} - -.superHeader .right { - position: absolute; - right: 1.5mm; - top: 0.75ex; -} - -.midHeader { - color: rgb(39,78,144); - background-color: rgb(140,170,230); -} - -.headerTitle { - font-size: 337%; - font-weight: normal; - margin: 0 0 0 4mm; - padding: 0.25ex 0; -} - -.subHeader { - color: white; - background-color: rgb(0,51,153); - margin: 0; - padding: 1ex 1ex 1ex 1.5mm; -} - -.subHeader a { - color: white; - background-color: transparent; - text-decoration: none; - font-weight: bold; - margin: 0; - padding: 0 0.75ex 0 0.5ex; -} - -.subHeader a:hover { - text-decoration: underline; -} - -.superHeader .highlight, .subHeader .highlight { - color: rgb(253,160,91); - background-color: transparent; -} - - -/* ##### Side Boxes ##### */ - -#side-bar { - width: 14em; - margin: 2.5em 0 0 1.25mm; - float: left; - clear: left; -} - -body > #side-bar { - margin-left: 2.5mm; /* Circumvents a rendering bug in MSIE (6.0) */ -} - -.sideBarTitle { - color: white; - background-color: rgb(100,135,220); - font-weight: bold; - margin: 0; - padding: 0.4ex 0 0.4ex 0.6ex; -} - -#side-bar ul { - list-style-type: none; - list-style-position: outside; - margin: 0; - padding: 0 0 2.25em 0; -} - -#side-bar li { - margin: 0; - padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE (6.0) */ -} - -#side-bar a, .thisPage { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: none; - font-weight: bold; - margin: 0; - padding: 1.3ex 2ex; - display: block; -} - -.thisPage { - color: black; - background-color: transparent; -} - -#side-bar a:hover { - color: white; - background-color: rgb(100,135,220); - text-decoration: none; -} - -.sideBarText { - line-height: 1.5em; - margin: 0 0 2.5em 0; - padding: 1ex 0.5ex 0 0.5ex; - display: block; -} - -.sideBarText + .sideBarText { /* Not recognised by MSIE (6.0) */ - margin-top: -1.5em; -} - -#side-bar .sideBarText a { - text-decoration: underline; - font-weight: normal; - margin: 0; - padding: 0; - display: inline; -} - -#side-bar .sideBarText a:hover { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: none; -} - - -/* ##### Main Copy ##### */ - -#main-copy { - color: black; - background-color: transparent; - text-align: justify; - line-height: 1.5em; - margin: -1em 0 0 15em; - padding: 0.5mm 5mm 5mm 5mm; -} - -#bodyText { - margin: 0 0 0 15.5em; - padding: 2mm 5mm 2mm 5mm; -} - - -#main-copy p { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -#main-copy a { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: underline; -} - -#main-copy a:hover { - text-decoration: none; -} - -#main-copy h1 { - color: rgb(0,102,204); - background-color: transparent; - font-size: 145.5%; - font-weight: bold; - margin: 2em 0 0 0; - padding: 0.5ex 0 0.5ex 0.6ex; - border-bottom: 1px solid rgb(0,102,204); -} - -#main-copy .topOfPage { - color: rgb(0,102,204); - background-color: transparent; - font-size: 91%; - font-weight: bold; - text-decoration: none; - margin: 3ex 1ex 0 0; - padding: 0; - float: right; -} - -dl { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -dt { - font-weight: bold; - margin: 0 0 0 0; - padding: 0; -} - -dd { - margin: 0 0 2em 2em; - padding: 0; -} - - -/* ##### Footer ##### */ - -#footer { - color: white; - background-color: rgb(100,135,220); - font-size: 91%; - margin: 0; - padding: 1em 2.5mm 2.5ex 2.5mm; - clear: both; -} - -#footer .left { - text-align: left; - line-height: 1.45em; - float: left; - clear: left; -} - -#footer .right { - text-align: right; - line-height: 1.45em; -} - -#footer a { - color: white; - background-color: transparent; - text-decoration: underline; -} - -#footer a:hover { - text-decoration: none; -} -\ No newline at end of file diff --git a/pub/style/style.css b/pub/style/style.css @@ -1,330 +1,152 @@ -/* Default werc style */ - -body { - color: black; - background-color: white; - font-family: Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif; - font-size: 84%; /* Enables font size scaling in MSIE */ - margin: 0; - padding: 0; -} - - -/* # Header # */ -.superHeader { - color: white; - background-color: rgb(100,135,220); - height: 1.6em; -} - -.superHeader img { vertical-align: bottom; } - -.superHeader a { - color: white; - background-color: transparent; - font-size: 91%; - margin: 0; - padding: 0 0.5ex 0 0.25ex; -} - -a { text-decoration: none; } -a:hover { text-decoration: underline; } - -.superHeader div { - position: absolute; - top: 0.40ex; -} - -.superHeader .left { left: 0.4em; } -.superHeader .right { right: 0.4em; } - -.midHeader { - color: rgb(39,78,144); - background-color: rgb(140,170,230); - background-color: #ff6d06; - border: solid 0 black; - border-width: 2px 0; -} - -.headerTitle { - color: black; - font-size: 233%; - font-weight: normal; - margin: 0 0 0 4mm; - padding: 0.25ex 0; -} -#headerSubTitle { - font-size: 50%; - font-style: italic; - margin-left: 1em; -} - -.headerTitle a { color: black; } -.headerTitle a:hover { text-decoration: none; } - -.subHeader { - display: none; - color: white; - background-color: rgb(0,51,153); - margin: 0; - padding: 1ex 1ex 1ex 1.5mm; -} - -.subHeader a { - color: white; - background-color: transparent; - font-weight: bold; - margin: 0; - padding: 0 0.75ex 0 0.5ex; -} - -.superHeader .highlight, .subHeader .highlight { - color: rgb(253,160,91); - background-color: transparent; -} - - -/* # Side # */ -#side-bar { - width: 16em; - float: left; - clear: left; - border-right: 1px solid #ddd; -} - -#side-bar div { - border-bottom: 1px solid #ddd; -} - -.sideBarTitle { - font-weight: bold; - margin: 0 0 0.5em 2mm; - padding: 1em 0 0 0; -} - -#side-bar ul { - list-style-type: none; - list-style-position: outside; - margin: 0; - padding: 0 0 0.3em 0; -} - -li ul { - padding-left: 0.6em !important; -} - -#side-bar li { - margin: 0; - padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 XXX should move to iehacks.css, this causes an ugly gap */ -} - -#side-bar a { - color: rgb(0,102,204); - background-color: transparent; - margin: 0; - padding: 0.25em 1ex 0.25em 2mm; - display: block; - text-transform: capitalize; - font-weight: bold!important; - font-size: 102%; - border-left: white solid 0.2em; -} - -.thisPage, .thisPage a { - color: black!important; - background-color: white; - padding-left: 5mm; -} - -#side-bar a:hover { - color: white; - background-color: rgb(100,135,220); - border-left: black solid 0.2em; - text-decoration: none; -} - -.sideBarText { - line-height: 1.5em; - margin: 0 0 1em 0; - padding: 0 1.5ex 0 2.5mm; - display: block; -} - -#side-bar .sideBarText a { - margin: 0; - padding: 0; - display: inline; -} - -#side-bar .sideBarText a:hover { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: none; -} - - -/* # Main Copy # */ -#main-copy { - max-width: 70em; - color: black; - background-color: transparent; - text-align: justify; - line-height: 1.5em; - margin: 0em 0 0 16em; - padding: 0.5mm 5mm 5mm 5mm; - border-left: 1px solid #ddd; -} - -#bodyText { - margin: 0 0 0 15.5em; - padding: 2mm 5mm 2mm 5mm; -} - -#main-copy p { - margin: 1em 1ex 1em 1ex !important; /* Need !important so troff-generated pages don't look totally squezed */ - padding: 0; -} - -#main-copy a { - color: rgb(0,102,204); - background-color: transparent; -} - -#main-copy a:hover { - color: rgb(100,135,220); -} - -#main-copy h1, #main-copy h2 { - color: rgb(0,102,204); - background-color: transparent; - font-size: 145.5%; - font-weight: bold; - margin: 2em 0 0 0; - padding: 0.5ex 0 0.5ex 0.6ex; - border-bottom: 2px solid rgb(0,102,204); -} - -#main-copy h2 { - font-size: 115.5%; - border-bottom: 1px solid rgb(0,102,204); -} - -#main-copy .topOfPage { - color: rgb(0,102,204); - background-color: transparent; - font-size: 91%; - font-weight: bold; - text-decoration: none; - margin: 3ex 1ex 0 0; - padding: 0; - float: right; -} - -dl { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -dt { - font-weight: bold; - margin: 0 0 0 0; - padding: 0; -} - -dd { - margin: 0 0 2em 2em; - padding: 0; -} - - -/* # Footer # */ -#footer { - color: white; - background-color: rgb(100,135,220); - padding: 1em; - clear: both; -} - -#footer .left { - text-align: left; - line-height: 1.55em; - float: left; - clear: left; -} - -#footer .right { - text-align: right; - line-height: 1.45em; -} - -#footer a { - color: white; - background-color: transparent; -} - - -/* GENERAL */ - -table { - border: solid 1px black; -} -th { - background-color: #abc; - border: solid 1px black; - text-align: center; -} -td { - background-color: #def; - border: solid 1px black; -} - -hr { - border-width: 0px 0px 0.1em 0px; - border-color: black; -} - -acronym, .titleTip { - border-bottom: 1px solid #ddd; - cursor: help; - margin: 0; - padding: 0 0 0.4px 0; -} - -pre { - margin-left: 2em; - font-size: 1.2em; -} - -blockquote { - border-left: 1px solid blue; - font-style: italic; -} - -.smallCaps { - font-size: 110%; - font-variant: small-caps; -} - -.doNotDisplay { display: none; } - - -.notify_errors, -.notify_notes, -.notify_success { padding: .8em; margin-bottom: 1em; border: 2px solid #ddd; } - -.notify_errors { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; } -.notify_notes { background: #FFF6BF; color: #514721; border-color: #FFD324; } -.notify_success { background: #E6EFC2; color: #264409; border-color: #C6D880; } -.notify_errors a { color: #8a1f11; } -.notify_notes a { color: #514721; } -.notify_success a { color: #264409; } - - -/* # Page/Handler specific # */ -h1.dir-list-head, ul.dir-list { - text-transform: capitalize; - font-weight: bold; -} -ul.sitemap-list a { - text-transform: capitalize; -} +body { + background-color: #eee; + color: #333; + font-family: Cantarell, Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif; + text-align: justify; + padding: 0; + margin: 0; +} + +a { + color: #36c; + text-decoration: none; +} + +a:hover { + color: #039; +} + +#innerbody { + padding: 1em; + margin: 0 auto 0 auto; + max-width: 50em; +} + +#offsite { + background-color: #ccc; + padding: 0.5ex 0 0.5ex 0; + margin: 0; + -moz-box-shadow: 0 0 1ex #666; + -webkit-box-shadow: 0 0 1ex #666; + box-shadow: 0 0 1ex #666; + text-align: center; + font-size: 84%; +} + +#offsite a { + margin: 0; + padding: 0.5ex 1em 0.5ex 1em; +} + +#offsite a:hover { + color: #36c; + background-color: #ddd; +} + +#offsite a.current { + background-color: #eee; + color: #333; + -moz-box-shadow: 0 0 0.5ex #fff; + -webkit-box-shadow: 0 0 0.5ex #fff; + box-shadow: 0 0 0.5ex #fff; +} + +#header { + clear: both; + color: #666; + text-shadow: 1px 1px #fff; + font-size: 1.7em; + padding: 0.7ex; +} + +#header a, a:hover { + color: #666; +} + +h1 { + margin: 1em 1ex 0.5ex 0; + font-size: 1.4em; +} + +h2 { + margin: 1em 1ex 0.5ex 0; + font-size: 1.3em; +} + +h3 { + margin: 1em 1ex 0.5ex 0; + font-size: 1.2em; +} + +h4 { + margin: 1em 1ex 0.5ex 0; + font-size: 1.1em; +} + +#content { + padding: 0; + margin: 1ex 0 0 0; + -moz-box-shadow: 0 0 0.7ex #999; + -webkit-box-shadow: 0 0 0.7ex #999; + box-shadow: 0 0 0.7ex #999; +} + +#nav { + background-color: #ddd; + float: right; + margin: 0 0 2em 2em; + padding: 0; +} + +#nav ul { + margin: 0 0 1ex 0; + padding: 0; +} + +#nav li { + list-style: none; + padding: 0; + margin: 0; + width: 100%; +} + +#nav li a { + color: #36c; + display: block; + margin: 0; + padding: 0.8ex 2em 0.8ex 1em; +} + +#nav li a:hover { + background: #eee; +} + +#nav li a.current { + background-color: #fff; + color: #333; + -moz-box-shadow: 0.3ex 0.3ex 0.3ex #999; + -webkit-box-shadow: 0.3ex 0.3ex 0.3ex #999; + box-shadow: 0.3ex 0.3ex 0.3ex #999; +} + +#main { + align: left; + background-color: #fff; + padding: 5ex; +} + +#footer { + clear: both; + color: #666; + font-size: 84%; + padding: 1ex; + margin: 0 0 1em 0; +} + +.left { + float: left; +} + +.right { + float: right; +} diff --git a/pub/style/style_old.css b/pub/style/style_old.css @@ -1,330 +0,0 @@ -/* Old Default style */ -/* ##### Common Styles ##### */ - -body { - color: black; - XXXbackground-color: rgb(240,240,240); - background-color: white; - font-family: verdana, helvetica, arial, sans-serif; - font-size: 71%; /* Enables font size scaling in MSIE */ - margin: 0; - padding: 0; -} - -html > body { - font-size: 8.5pt; -} - -acronym, .titleTip { - border-bottom: 1px dotted rgb(153,153,153); - cursor: help; - margin: 0; - padding: 0 0 0.4px 0; -} - -.doNotDisplay { - display: none; -} - -.smallCaps { - font-size: 110%; - font-variant: small-caps; -} - - -/* ##### Header ##### */ - -.superHeader { - color: white; - background-color: rgb(100,135,220); - height: 2em; -} - -.superHeader a { - color: white; - background-color: transparent; - text-decoration: none; - font-size: 91%; - margin: 0; - padding: 0 0.5ex 0 0.25ex; -} - -.superHeader a:hover { - text-decoration: underline; -} - -.superHeader .left { - position: absolute; - left: 1.5mm; - top: 0.75ex; -} - -.superHeader .right { - position: absolute; - right: 1.5mm; - top: 0.75ex; -} - -.midHeader { - color: rgb(39,78,144); - background-color: rgb(140,170,230); - border: solid 0 black; - border-width: 0.3em 0; -} - -.headerTitle { - color: black; - font-size: 337%; - font-weight: normal; - margin: 0 0 0 4mm; - padding: 0.25ex 0; -} -#headerSubTitle { - font-size: 50%; - font-style: italic; -} - -.subHeader { -display: none; - color: white; - background-color: rgb(0,51,153); - margin: 0; - padding: 1ex 1ex 1ex 1.5mm; -} - -.subHeader a { - color: white; - background-color: transparent; - text-decoration: none; - font-weight: bold; - margin: 0; - padding: 0 0.75ex 0 0.5ex; -} - -.subHeader a:hover { - text-decoration: underline; -} - -.superHeader .highlight, .subHeader .highlight { - color: rgb(253,160,91); - background-color: transparent; -} - - -/* ##### Side Bar ##### */ - -#side-bar { - width: 15em; - float: left; - clear: left; - border-right: 1px solid rgb(153,153,153); -} - -#side-bar div { - border-bottom: 1px solid rgb(153,153,153); -} - -.sideBarTitle { - font-weight: bold; - margin: 0 0 0.5em 2.5mm; - padding: 1em 0 0 0; -} - -#side-bar ul { - list-style-type: none; - list-style-position: outside; - margin: 0; - padding: 0 0 1.1em 0; -} - -#side-bar li { - margin: 0; - padding: 0.1ex 0; /* Circumvents a rendering bug (?) in MSIE 6.0 */ -} - -#side-bar a, .thisPage { - color: rgb(0,102,204); - background-color: transparent; - XXXtext-decoration: none; - margin: 0; - padding: 0.55em 1ex 0.55em 5mm; - display: block; -} - -.thisPage { - color: black; - background-color: white; - padding-left: 5mm; - XXXborder-top: 1px solid rgb(153,153,153); - XXXborder-bottom: 1px solid rgb(153,153,153); - font-weight: 600; -} - -#side-bar a:hover { - color: white; - background-color: rgb(100,135,220); - text-decoration: none; -} - -.sideBarText { - line-height: 1.5em; - margin: 0 0 1em 0; - padding: 0 1.5ex 0 2.5mm; - display: block; -} - -#side-bar .sideBarText a { - text-decoration: underline; - margin: 0; - padding: 0; - display: inline; -} - -#side-bar .sideBarText a:hover { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: none; -} - -.lighterBackground { - color: inherit; - background-color: white; -} - - -/* ##### Main Copy ##### */ - -#main-copy { - max-width: 90em; - color: black; - background-color: white; - text-align: justify; - line-height: 1.5em; - margin: 0 0 0 15em; - padding: 0.5mm 5mm 5mm 5mm; - border-left: 1px solid rgb(153,153,153); -} - -#main-copy p { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -#main-copy a { - color: rgb(0,102,204); - background-color: transparent; - text-decoration: underline; -} - -#main-copy a:hover { - text-decoration: none; -} - -#main-copy h1 { - color: white; - background-color: rgb(100,135,220); - font-size: 100%; - font-weight: bold; - margin: 3em 0 0 0; - padding: 0.5ex 0 0.5ex 1ex; -} - -#main-copy .topOfPage { - color: white; - background-color: transparent; - font-size: 91%; - font-weight: bold; - text-decoration: none; - margin: 2.5ex 1ex 0 0; /* For MSIE */ - padding: 0; - float: right; -} - -#main-copy > .topOfPage { - margin: 2.75ex 1ex 0 0; /* For fully standards-compliant user agents */ -} - -dl { - margin: 1em 1ex 2em 1ex; - padding: 0; -} - -dt { - font-weight: bold; - margin: 0 0 0 0; - padding: 0; -} - -dd { - margin: 0 0 2em 2em; - padding: 0; -} - - -/* ##### Footer ##### */ - -#footer { - color: white; - background-color: rgb(100,135,220); - font-size: 91%; - margin: 0; - padding: 1em 2.5mm 2.5ex 2.5mm; - clear: both; -} - -#footer .left { - line-height: 1.45em; - float: left; - clear: left; -} - -#footer .right { - text-align: right; - line-height: 1.45em; -} - -#footer a { - color: white; - background-color: transparent; - text-decoration: underline; -} - -#footer a:hover { - text-decoration: none; -} - - -/* GENERAL */ -/* Spam */ -.spam { - text-align: center; -} - -/* Tables */ -table { - border: solid 1px black; -} -th { - background-color: #abc; - border: solid 1px black; -} -td { - background-color: #def; - border: solid 1px black; -} - -hr { - border-width: 0px 0px 0.1em 0px; - border-color: black; -} - -.spam table, .spam th, .spam td { - border: none; -} - -/* Code */ -pre { - margin-left: 2em; -} - - diff --git a/sites/default.cat-v.org/_werc/lib/footer.inc b/sites/default.cat-v.org/_werc/lib/footer.inc @@ -1,29 +0,0 @@ -<br class="doNotDisplay doNotPrint" /> - -<div class="left"><a href="http://werc.cat-v.org/">Powered by werc</a></div> - -<div class="right"> -<form action="http://www.google.com/cse" id="cse-search-box" style="display: inline"> - <div style="display: inline"> - <input type="hidden" name="cx" value="partner-pub-2060328396151526:ea9sar-xttn" /> - <input type="hidden" name="ie" value="UTF-8" /> - <input type="text" name="q" size="32" /> - <input type="submit" name="sa" value="Search" /> - </div> -</form> -<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></div> - - -<script type="text/javascript"> -var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); -document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); -</script> -<script type="text/javascript"> -try { -var pageTracker = _gat._getTracker("UA-1220719-1"); -pageTracker._setDomainName("cat-v.org"); -pageTracker._trackPageview(); - -var pageTracker2 = _gat._getTracker("UA-1220719-12"); -pageTracker2._trackPageview(); -} catch(err) {}</script> diff --git a/sites/default.cat-v.org/_werc/lib/headers.inc b/sites/default.cat-v.org/_werc/lib/headers.inc @@ -1,4 +0,0 @@ -<meta name="verify-v1" content="6zEoK0WMlnLmIS/w7Pnh6+srZECHsvnMGN0kQmowSGk=" /> -<meta name="google-site-verification" content="z5zCyEitNLNZmhVblsogrEiy6Acf0UZROsFMtLjioN4" /> -<META name="y_key" content="49dff3fad5352458"><META name="y_key" content="5dc40bfee9494e98"><META name="y_key" content="b60a53d1fa98f4c8"> -<meta name="msvalidate.01" content="5008C6E6B172BEB1F43E770296C3D560" /> diff --git a/sites/default.cat-v.org/_werc/lib/top_bar.inc b/sites/default.cat-v.org/_werc/lib/top_bar.inc @@ -1,25 +0,0 @@ - <div class="left"> - <a href="http://quotes.cat-v.org">quotes</a> | - <a href="http://doc.cat-v.org">docs</a> | - <a href="http://repo.cat-v.org">repo</a> | - <a href="http://go-lang.cat-v.org">golang</a> | - <a href="http://sam.cat-v.org">sam</a> | - <a href="http://man.cat-v.org">man</a> | - <a href="http://acme.cat-v.org">acme</a> | - <a href="http://glenda.cat-v.org">Glenda</a> | - <a href="http://ninetimes.cat-v.org">9times</a> | - <a href="http://harmful.cat-v.org">harmful</a> | - <a href="http://9p.cat-v.org/">9P</a> | - <a href="http://cat-v.org">cat-v.org</a> - </div> - - <div class="right"> - - <span class="doNotDisplay">Related sites:</span> - | <a href="http://cat-v.org/update_log">site updates</a> - | <a href="/sitemap">site map</a> | - - <script type="text/javascript">var addthis_disable_flash = true; var addthis_pub="uriell";</script> - <a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"></script> - </div> - diff --git a/sites/tst.cat-v.org/_werc/config b/sites/tst.cat-v.org/_werc/config @@ -1,2 +0,0 @@ -masterSite=default.cat-v.org -siteTitle='Werc Test Suite' diff --git a/sites/tst.cat-v.org/apps/blagh/_werc/config b/sites/tst.cat-v.org/apps/blagh/_werc/config @@ -1,3 +0,0 @@ -conf_enable_blog -conf_blog_pubsubdub_hub='http://pubsubhubbub.appspot.com/' - diff --git a/sites/tst.cat-v.org/apps/bridge/a/_werc/config b/sites/tst.cat-v.org/apps/bridge/a/_werc/config @@ -1 +0,0 @@ -conf_enable_comments -a diff --git a/sites/tst.cat-v.org/index.md b/sites/tst.cat-v.org/index.md @@ -1,4 +0,0 @@ -Werc Test Suite -=============== - -This site contants sample/test content for the werc web anti-framework. diff --git a/sites/tst.cat-v.org/titles/dashed-title.md b/sites/tst.cat-v.org/titles/dashed-title.md @@ -1,3 +0,0 @@ -This page has an all-lower case dashed title. - -The correct page title should be: `Dashed Title`. diff --git a/sites/tst.cat-v.org/titles/under_title.md b/sites/tst.cat-v.org/titles/under_title.md @@ -1,3 +0,0 @@ -This page has an all-lower case underscore separated title. - -The correct page title should be: `Under Title`. diff --git a/sites/werc.cat-v.org/_werc/config b/sites/werc.cat-v.org/_werc/config @@ -1,7 +0,0 @@ -masterSite=default.cat-v.org -siteTitle='werc' -siteSubTitle='Bringing minimalism and sanity to the web' -conf_enable_comments -conf_enable_wiki - -#ll_add handlers_body_head echo '<div style="text-align:right"><script type="text/javascript" src="http://www.reddit.com/r/programming/button.js?t=1"></script></div>' diff --git a/sites/werc.cat-v.org/apps/_footer.md b/sites/werc.cat-v.org/apps/_footer.md @@ -1,10 +0,0 @@ -External Apps -============= - -This are some apps developed by werc users, to install them put them in your werc's `apps/` dir and enable them from any config file as usual. - -* [Xibit](http://xibit.soul9.org/): an image gallery app by written by soul9. -* [SMAK](http://www.anarchyinthetubes.com/hg/smak/): a "very simple" image gallery by yiyus. -* [hgwerc](http://www.anarchyinthetubes.com/hg/hgwebdir.cgi/hgwerc/): a wrapper around the mercurial web interface to integrate it into werc sites, also by yiyus. -* [scrappydog](http://code.google.com/p/scrappydog/): A werc based online scrapbook by maht. -* [flip](http://www.anarchyinthetubes.com/hg/flip/): A web interface to view PDFs, by yiyus. diff --git a/sites/werc.cat-v.org/apps/_header.md b/sites/werc.cat-v.org/apps/_header.md @@ -1,5 +0,0 @@ -Werc Apps -========= - -Werc includes the following 'apps' by default that any site can enable usually by executing a function of the form `conf_enable_myapp` in any given `_werc/config` file. - diff --git a/sites/werc.cat-v.org/apps/blagh/index.md b/sites/werc.cat-v.org/apps/blagh/index.md @@ -1,59 +0,0 @@ -Blagh - A Blogging engine for people who hate blogs -=================================================== - -Blagh is a werc app that implements a blogging engine. - -Some features include: - -* File based, database free. -* History browsing. -* Atom and RSS feeds. -* Server-side feed 'aggregation' (merge multiple blogs into a single one). -* Comments using [bridge](../bridge/) -* Markdown formatting. - -Possible alternative names: Blag, Blah, Bragg. - -Posting -------- - -New pots can be created in at least two different ways: using the web interface (if you have logged in and your user or groups are in `$conf_blog_editors`) or from the command line using the script at `bin/aux/bpst.rc`. This script will, optionally, take a file as an argument using the `-f` switch. It will open that file in your `$EDITOR` or create a new temporary file if the `-f` switch is omitted. When you have finished editing the file, the script will call `ispell` (so you may want to install that as well) to check for spelling errors. Once that has completed a new directory structure will be created in your blog's root directory as a hidden folder named after the current year (as detected by `date`). You can inspect this directory structure for continuity and `mv` it to unhide it when you are satisfied. You are encouraged to read the source of that very simple script, and you shall see that it is trivial to create new posts by simply using `mkdir` and `echo`. - -Configuration options ---------------------- - -This are options you can set in your _werc/config - -### `conf_enable_blog` *[blog dirs]* - -Setup a blog in this dir. By default the blog contents will only include posts stored in this dir, if you pass any arguments the posts in the various dirs will be aggregated in this feed. - -Examples: - - # This will setup a blog in this dir that includes only posts in this dir. - conf_enable_blog - - # This will create a blog that aggregates all the posts in all blog dirs in any users/ sub dir. - conf_enable_blog users/*/blog - -### `conf_blog_editors`=(*groups or users that will be allowed to make new blog posts*) - -This is optional and by default set to the 'blog-editors' group. - -### `conf_max_lines_per_post=`*[integer]* - -This option may be added using the patch linked bellow. It defaults to `7` which **should** only include the page heading and the first two paragraphs of each post on the main blogroll(?) page. This makes many assumptions that should be noted. It just removes everything from `conf_max_lines_per_post` to the end of the file. Traditionally, line 1 is the H1 title and line 2 is the line of = required to tell mardown of it's importance. This then assumes that each paragraph is on a single line, which is not enforced by markdown. See it in action at <http://blog.senet.us> - -[blagh-91a4597480a7-conf\_max\_lines\_per\_post.diff](http://senet.us/blagh-91a4597480a7-conf_max_lines_per_post.diff) (1.2K) (20100114) - -**Author**: J Thigpen (cdarwin) <darwin@senet.us> - -See also: - -* To edit blog posts you can use the functionality provided by [the dirdir app](../dirdir/). -* Commenting can be handled by [the bridge app](../bridge/). - - - - - diff --git a/sites/werc.cat-v.org/apps/bridge/index.md b/sites/werc.cat-v.org/apps/bridge/index.md @@ -1,13 +0,0 @@ -Bridge -====== - -Bridge is a comments/forum application for werc, which lets people post comments related to any existing document/element. - - -Configuration options ---------------------- - -### `conf_enable_comments` [-n] [*users and groups allowed to comment*] - -This will enable comments in this directory and all sub-directories. `-n` enables commenting by unregistered users (their posts will be set aside for review and approval by administrators). - diff --git a/sites/werc.cat-v.org/apps/dirdir/index.md b/sites/werc.cat-v.org/apps/dirdir/index.md @@ -1,41 +0,0 @@ -DirDir - A directory-oriented WikiWiki -====================================== - -DirDir is the next generation [diri wiki](http://repo.cat-v.org/diri/), now implemented on top of werc and -taking advantage of its user, site management frameworks and other -infrastructure. - -Features --------- - -DirDir is still somewhat experimental, but already all features diri had, plus some extras thanks to werc's power: - - * Hierarchical organization. - * Markdown formatting. - * Easily customizable templates - * Simple and fine grained user permisions system. - * Completely database free. - * All needed to setup diridiri is to set a flag in your _werc/config file. - * Automatically wiki-fy existing werc documents. - * Implemented in about two dozen lines of rc scripts. - - -Documentation -------------- - -Just login, go to any page, and click the `Edit` button. - -To create a new page, go to the address where you want to create the new page, click `Edit`, enter the initial contents, `Save`, and you are done. - - -Status ------- - -Mostly usable, all basic features already implemented in the latest werc source -tree. - -About the name --------------- - -DirDir is a pun on its predecessor diri and WikiWiki, and [Dirdir is also the title of a novel](http://www.amazon.com/gp/product/0879974788?ie=UTF8&tag=catv-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0879974788) by science fiction and literature grand master [Jack Vance](http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26redirect%3Dtrue%26search-type%3Dss%26index%3Dbooks%26ref%3Dntt%255Fathr%255Fdp%255Fsr%255F1%26field-author%3DJack%2520Vance&tag=catv-20&linkCode=ur2&camp=1789&creative=39095). - diff --git a/sites/werc.cat-v.org/apps/wman/index.md b/sites/werc.cat-v.org/apps/wman/index.md @@ -1,34 +0,0 @@ -wman - A Web Interface to Man Pages -=================================== - -Wman is an app that allows you to export Unix and Plan 9-style man pages. It -can do this directly, without need to generate static html versions and will -automatically pick updates and new man pages. - -It is also fairly smart in generating links for man page references. - -Configuration -------------- - -To display a collection of man pages in a desired path you can use the following config directive: - - conf_enable_wman /usr/share/man - -This will allow you to browse the man pages under /usr/share/man. - -For man pages organized in the traditional unix structure `manN/foo.N` where N is the section number, set in your config file: - - wman_unix_mode=1 - -Demo ----- - -For a demo of this app see [man.cat-v.org](http://man.cat-v.org). - -TODO ----- - -* We don't handle compressed man pages, but this should be trivial to add. -* Unix systems might use different macros for their man pages. -* Search (using keywords? Google? grep?) -* Inferno contains man pages named like 'foo-0intro', which are refered as foo-intro(X), should automatically add (or remove) the extra '0' (Examples: sys-intro(2) and draw-intro(2)). diff --git a/sites/werc.cat-v.org/development/index.md b/sites/werc.cat-v.org/development/index.md @@ -1,21 +0,0 @@ -Werc Development -================ - -The latest dev code is available in the werc mercurial repo: http://hg.cat-v.org/werc/ - - -Version Numbering and Branching Rules -------------------------------------- - -There is no such thing! Originally a convention similar to that of the Linux kernel was used, but it is easier to do incremental work on a single branch. - -For radical or experimental changes the `werc-dev` branch might be used, but at the moment it is outdated. - -Bug reports, feature requests, bug fixes and other patches are all very welcome, just send them to the [werc9](http://groups.google.com/group/werc9) mailing list. - - -See Also --------- - -* The [Roadmap](roadmap). -* [TODO](todo) list. diff --git a/sites/werc.cat-v.org/development/roadmap.md b/sites/werc.cat-v.org/development/roadmap.md @@ -1,62 +0,0 @@ -Development Roadmap -=================== - -The versioning scheme is a mess, originally even minor version numbers were -supposed to be stable and odd ones development branches, but turns out that for -the most part it is easier to do incremental development instead of keeping -'dev' and 'stable' branches. - -A development branch might be added in the future if the changes are radical -enough and break backwards compatibility in some important way. For this the -deprecated and currently outdated `werc-dev` mercurial repo will be used. - - -Werc 1.5.x ----------- - -Planed major changes in 1.5 - -* Include required p9p binaries in standard distribution (or with some easy to deploy packaging). -* New/rewritten css layout, perhaps using fluid960gs? -* File upload support [*Code contributed by maht, needs integration*] -* OpenID support [*Code contributed by maht, also needs integration*] -* More complete test suite. - - -Werc 1.4.x, current stable branch ---------------------------------- - -* Mostly bugfixes, documentation work, and minor improvements. - - -Werc 1.2.x, previous stable branch ----------------------------------- - -* Only security fixes. - - -Werc 1.1.x dev branch ---------------------- - -* Convert all templates and pages to HTML 5. [*Done*] -* Include new markdown implementation in pure awk by yuyis.[*Done*] -* Native Plan 9 httpd works out of the box. [*Mostly done*] -* Support for Google's Pubsubhubbub. [*Experimental implementation already done*] -* Include test suite/site (also to be hosted at http://tst.cat-v.org) [*In Progress*] - - -Werc 1.0.x ----------- - -* Abandoned, please upgrade. - - ------------------------------------------------------ - -Werc 2.0 Plans --------------- - -* Big redesigns / rewrites. -* Any non-backwards compatible changes. -* Bring some sanity to the function/config-variable naming insanity. -* Nothing else planned yet. diff --git a/sites/werc.cat-v.org/development/todo.md b/sites/werc.cat-v.org/development/todo.md @@ -1,75 +0,0 @@ -Plans and Ideas for the Future -============================== - -This page lists various assorted ideas and features that have been proposed at -some point or another, nothing (except fixing the listed bugs) is assured to be -implemented, many things here might turn out to be bad ideas. - -Features --------- - -* Review ideas from: http://www.w3.org/TR/chips/ and http://www.w3.org/Provider/Style/URI and see if we can do better. -* Canonize and redirect all requests, we already do this for things like missing or trailing /, should do the same for /. and /./, etc. Deleting trailing . and , should make pasted urls in emails work as links (**Mostly done in RC1**) -* Blog: - * Comment threading. - * Some form of pagination (taking advantage of history browsing.) (**Partially done**) -* Sitemaps: - * Index pages should be used for description of directories. - * Cache web sitemap generation. (**Done in RC0**) -* Layout improvements: - * Need to find a way to rig the order of items in the sidebar. - * Right sidebar. - * Top+left/right nav vars (breadcrumbs at the top, current dir listing on the side) - * Make it easier to disable all sidebars and headers/footers, eg., for full screen mode. - * More testing and optimizations for mobile browsers, eg., http://www.operamini.com/demo/ Left sidebar had some minor issues in cellphones at some point. -* Better page titles (include whole path hierarchy?) (**Partially done, is it good enough now?**) -* Allow utf-8 characters in path elements (need to make sure this is safe, and not sure how useful it will be) -* General code: - * Write a regression test suite. (*Started*) - * Replace all references to non p9p/p9 programs (*Done?*) - * Document better the 'API' for sub-apps, both a set of environment vars apps can rely on (and in some cases set) and functions they can call (WIP). -* Better generation of descriptive HTML META tags, eg.,: {META name="description" content="This is the Google Summer of Code blog for Plan9 and Inferno projects."} {META name="keywords" content="google, summer of code, inferno, plan9, programming"} -* Should add werc to certain wikipedia lists: - * `http://en.wikipedia.org/wiki/List_of_content_management_systems` - * `http://en.wikipedia.org/wiki/Comparison_of_wiki_software` -* Include txt2tags as builtin alternative to markdown. -* Mathematic pseudo-CAPTCHA ala WP's 'Math Comment Spam Protection Plugin'. - - -Future Plansi and Blue Sky --------------------------- - -* Wanted [apps](/apps/): - * Tagging, eg., append to _werc/tags - * Related links sidebar generation. - * [Bug/issue tracking app](/apps/gregor/). - * Hg/git repository browser. - * Implement AtomPub. - -* Further modularization and extensibility (meta-templates) (Is the new app framework enough for this?) -* A way to wrap external cgi applications (eg., existing hg/git browser) -* A way to generate static sites (ie., use werc as an offline templating system) -* [9P](http://9p.cat-v.org) interface. -* New (simplified) markdown implementation, ideally in C or awk (maybe smu/libsmu by gottox?), yiyus great md2html.awk is a great start! - * Simplified - * Tables - * Images - * Autogenerated anchors/navigation boxes - * No inline html - - -Known Bugs ----------- - -* It seems that certain chars are not propely encoded in cookies, possibly broken chars: :&%[+ Fix should go in cgilib.rc^set_cookie (Have to figure out the proper way to scape cookie strings first) -* If a dir under apps/ doesn't contain an app.rc file, werc fails to start. A possible fix would be to replace $werc_apps default with `apps/*/app.rc` instead of `apps/*/`, this would be backwards incompatible, but I doubt anyone uses that option. -* Links in Blagh feeds become confused if markdown 'references' are used, markdown references suck, but I guess we need to address this somehow... -* Somewhat similarly to the abouve, relative urls in imgs, links, etc. can easily break when used in Blagh posts, so it is not all markdown's fault. - - -Fixed or WFM Bugs ------------------ - -* Sitemap can handle $dirfilter inconsistently from other places (**fixed**). -* Finding directories that are inaccessible (-rx) can generate an infinite loop (**Works for me? Fixed with new menu code?**) -* Some cat-v.org bits still left over here and there, should make them configurable (1.0 blocker) (**fixed**?) diff --git a/sites/werc.cat-v.org/docs/_werc/config b/sites/werc.cat-v.org/docs/_werc/config @@ -1 +0,0 @@ -conf_perm_redirect _ - diff --git a/sites/werc.cat-v.org/docs/config-options.md b/sites/werc.cat-v.org/docs/config-options.md @@ -1,60 +0,0 @@ -Werc Configuration Options -========================== - -You can also find a description of some basic config options in the `etc/initrc` file itself. - -General Setup Options --------------------- - -* `formatter` - Command to use for document formatting (usually some form of markdown), should be able to take input both from file names passed as arguments or from stdin if no file names are provided. By default: `formatter=(fltr_cache markdown.pl)` - - -Titles and Metadata -------------------- - -Variables: - -* Page title: - * siteTitle - * siteSubTitle - -* Html header meta tags: - * meta_description - `<meta name="description" ...` - * meta_keywords - `<meta name="keywords" ...` - * extraHeaders - Raw extra html headers, the content of this var will be inserted inside the `<head>` tag.. - - -Sidebar and Navigation ----------------------- - -Variables: - -* sideBarNavTitle - -Functions: - -* `conf_hide_paths [path_patterns ...]` - Hide the given patterns from navigation menu, sitemap and dir listing (do *not* depend on this for security!). - -HTTP Control ------------- - -Variables: - -* extraHttpHeaders - Raw HTTP headers to be added to response. - -Functions: - -* `conf_perm_redirect [pattern] destination` - If pattern is provided, match it against the requested url, and replace the match with `destination`; ie., *s/pattern/destination/. - - -Access Control and Permissions ------------------------------- - -The permissions system is very flexible, for example to only allow access to members of the group 'editors' you can do something like: - - if(! check_user editors) - perm_redirect /_users/login - -To automatically redirect users without permission to the login page if they are not members of the group 'editors'. - -See also [the documentation on user and group management](user_management). diff --git a/sites/werc.cat-v.org/docs/css-style.md b/sites/werc.cat-v.org/docs/css-style.md @@ -1,18 +0,0 @@ -Custom CSS Stylesheets -===================== - -If you create a file under your site's dir at _werc/pub/style.css it will be included automatically after the standard werc stylesheet. - -You can copy pub/style/style.css and customize it, or you can take a simpler file and just change the main color theme. - -Here is an example of how to set the main werc colors: - - - body { background-color: #FFFFF7; } - .midHeader { background-color: #FFFFE9; } - #side-bar { background-color: #EFFFEF; } - #side-bar a { color: black; } - #side-bar a:hover { - color: white!important; - background-color: #428a42; - } diff --git a/sites/werc.cat-v.org/docs/dir-listings.md b/sites/werc.cat-v.org/docs/dir-listings.md @@ -1,29 +0,0 @@ -Autogenerated Directory Listings -================================ - -If a directory has no `index.md`, `index.html` or `index.txt` and has no other -*main handler* set up by a [werc app](/apps/), the default directory listing -handler is used. - -The default directory handler simply displays the path to the directory, and a -list of links to all files and dirs located at this path. - - -Header and footer ------------------ - -If a `_header.md` or `_footer.md` files are found in the directory, their -contents will be displayed in the corresponding sections before and after -the directory contents. - - -Tuning the item's order ------------------------- - -You can set the `dir_listing_ls_opts` config variable in the dir's corresponding _werc/config to change the way items will be ordered. - -For example to list items in reverse chronological order simply add: - - dir_listing_ls_opts=( -t ) - -The options taken are [the standard Plan 9 ls(1) flags](http://man.cat-v.org/plan_9/1/ls). diff --git a/sites/werc.cat-v.org/docs/rc-template-lang.md b/sites/werc.cat-v.org/docs/rc-template-lang.md @@ -1,56 +0,0 @@ -The Rc Template Language -======================== - -Implemented by Kris, thanks! - -Basic syntax: - -* Lines starting with % are executed as rc commands, the resulting output is inserted in the document. -* use %{ and %} to delimit multi line sections of rc code (note the lack of space between % and { or }! -* To 'inline' the value of an environment variable use `%($my_var%)` - -That is basically it! - -For further documentation on rc see: - -* [The rc(1) man page from Plan 9](http://man.cat-v.org/plan_9/1/rc). -* [The rc shell paper by Tom Duff](http://rc.cat-v.org). - - -Examples --------- - -Loops - - <ul> - % for(i in a b c) { - % echo '<li>'$i'</li>' - % } - </uL> - -Can also be writen as: - - <ul> - %{ - for(i in a b c) { - echo '<li>'$i'</li>' - } - %} - </uL> - -and is equivalent to: - - <ul> - % for(i in a b c) { - <li>%($i%)</li> - % } - </uL> - -All three code examples result in this output: - - <ul> - <li>a</li> - <li>b</li> - <li>c</li> - </ul> - diff --git a/sites/werc.cat-v.org/docs/site-customization.md b/sites/werc.cat-v.org/docs/site-customization.md @@ -1,50 +0,0 @@ -Site Customization -================== - -To change any of the default templates and include files simply copy them -from /lib/ to your site's _werc/lib/ and edit at will. - -File Types ----------- - -* '.tpl' files are rc [template files](rc_template_lang). -* '.inc' are text files that are inserted 'as is' without any extra processing. - -Site Groups ------------ - -Site configuration and customization and be 'grouped' to allow a shared set of templates among a specific group of sites (useful for sets of sub-domains for example). - -Simply set 'masterSite' configuration variable to the name of the site you want to 'inherit' templates, style and configuration from. - -For example, if we have two sites bar.com and foo.bar.com, and in sites/foo.bar.com/_werc/conf we add: - - masterSite=bar.com - -When a template (eg., 404.tpl) is requested it will be looked up first in /sites/foo.bar.com/_werc/lib/404.tpl, if that fails then in /sites/bar.com/_werc/lib/, and if that is missing too, the default /lib/404.tpl is used. - -The same applies to .inc files. - - -List of Template and Included Files ------------------------------------ - -Here is a list of the most commonly used templates and include files with their corresponding descriptions. - -Include: - -* top_bar.inc: The thin header at the top of every page, usually contains static links to other related sites or anything else you like. -* footer.inc: Similar but at the bottom of every page, by default includes a link to the user login page. -* headers.inc: Raw html headers to be included inside <head> tag. - -Templates: - -* default_master.tpl: This is the main template, which calls all the sidebar and other handlers and applications, usually you won't need to edit it unless you want to make changes to the layout or similar dramatic changes. -* sitemap.tpl: Template for the sitemap page. -* 404.tpl: Template for 'File Not Found' pages. - - -See also --------- - -* [CSS style sheets customization](css_style). diff --git a/sites/werc.cat-v.org/docs/user-management.md b/sites/werc.cat-v.org/docs/user-management.md @@ -1,36 +0,0 @@ -User and Group Management -========================= - -User account and group membership information are stored under `etc/users/`. - -A user account consists of a directory under `etc/users/` that contains files with that users account information, the only required file is `password` containing a password for the user. For example: - - % ls etc/users/ - eekee uriel yosyp - % cat etc/users/uriel/password - mypass - -Users and groups share the same namespace, you can create a group the same way you create a user but instead of a 'password' file adding a 'members' file containing the names of the group members, one per line. - -A 'user-group' directory can contain both a password and members file, in which case it will act concurrently as a user and as a group. - -The group 'admin' is 'built-in' and any members in that group will have admin privileges for most werc apps by default. - -Example -------- - -To create a user called [glenda](http://glenda.cat-v.org) that is a member of the group `rabbits` you can do: - - % mkdir etc/users/glenda/ - % echo carrot > etc/users/glenda/password - % mkdir -p etc/users/rabbits - % echo glenda >> etc/users/rabbits/members - -Utils ------ - -The script at bin/aux/addwuser.rc allows you to even more trivially add users. - - addwuser.rc user_name user_pass [groups ...] - - diff --git a/sites/werc.cat-v.org/docs/web-server-setup/_header.md b/sites/werc.cat-v.org/docs/web-server-setup/_header.md @@ -1,16 +0,0 @@ -Setting Up Your HTTP Server to Run Werc -======================================= - - -Werc should work with any web server that supports the CGI interface, and a few -that don't. Here are collected instructions and sample configurations for some -of the most popular HTTP servers that people has used with werc. - -In general setup consists of mapping all paths for a virtual host to the -werc.rc script, usually in practice this means that the `document root` (or -similar concept) for a virtual host is mapped to -`/path/to/werc/sites/domain.name.com/`, and if no static file matches the -request, control is handed to werc.rc, this allows the HTTP server to handle -static files and werc to handle everything else (note that such a setup will -expose your `_werc/config` files, which usually should not be a security -issue). diff --git a/sites/werc.cat-v.org/docs/web-server-setup/apache.md b/sites/werc.cat-v.org/docs/web-server-setup/apache.md @@ -1,92 +0,0 @@ -Setup werc with Apache -====================== - -Note: Apache 2.x configuration should be similar to 1.3.x, but Apache 2.x is not recommended due to unwindy complexity, please use a saner web server. - -Apache 1.3.x: minimalist configuration -====================================== - -No virtual hosts and let werc handle static files. - - RewriteEngine On - ServerName test.cat-v.org - AddHandler cgi-script .rc - - <Directory /var/www/werc/bin> - Options ExecCGI - </Directory> - <IfModule mod_dir.c> - DirectoryIndex /werc.rc - </IfModule> - - RewriteRule /werc.rc /var/www/werc/bin/werc.rc - DocumentRoot /var/www/werc/bin/ - ErrorDocument 404 /werc.rc - - -Apache 1.3.x: standard configuration -==================================== - -This lets apache handle static files. - - <VirtualHost *> - - RewriteEngine On - ServerName test.cat-v.org - AddHandler cgi-script .rc - - <Directory /var/wwww/werc/bin> - Options ExecCGI - </Directory> - <IfModule mod_dir.c> - DirectoryIndex /werc.rc - </IfModule> - - RewriteRule (.*) /var/www/werc/sites/%{HTTP_HOST}/$1 - - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule .* /var/www/werc/bin/werc.rc - - RewriteRule /werc.rc /var/www/werc/bin/werc.rc - DocumentRoot /var/www/werc/bin/ - ErrorDocument 404 /werc.rc - - </VirtualHost> - - -Apache 1.3.x: advanced configuration -==================================== - - - <VirtualHost *> - - RewriteEngine On - ServerName cat-v.org - ServerAlias www.cat-v.org harmful.cat-v.org 9p.cat-v.org gsoc.cat-v.org doc.cat-v.org uriel.cat-v.org www.binarydream.org ninetimes.cat-v.org *.cat-v.org - AddHandler cgi-script .rc - AddHandler cgi-script .cgi - <Directory /home/uriel/cat-v.org/bin> - Options ExecCGI - </Directory> - <IfModule mod_dir.c> - DirectoryIndex /werc.rc - </IfModule> - - RewriteRule ^/hg/(.*) /home/uriel/cat-v.org/bin/hgwebdir.cgi/$1 [L] - - RewriteRule /pub/style/style.css /home/uriel/cat-v.org/pub/style/style.css [L] - RewriteRule /pub/ /home/uriel/cat-v.org/pub/ [L] - RewriteRule /favicon.ico /home/uriel/cat-v.org/pub/default_favicon.ico [L] - - - RewriteRule (.*) /home/uriel/cat-v.org/sites/%{HTTP_HOST}/$1 - - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule .* /home/uriel/cat-v.org/bin/werc.rc - - RewriteRule /werc.rc /home/uriel/cat-v.org/bin/werc.rc - DocumentRoot /home/uriel/cat-v.org/bin/ - ErrorDocument 404 /werc.rc - - </VirtualHost> - diff --git a/sites/werc.cat-v.org/docs/web-server-setup/cherokee.md b/sites/werc.cat-v.org/docs/web-server-setup/cherokee.md @@ -1,31 +0,0 @@ -Configuring werc with Cherokee -============================== - -Contributed by sqweek, thanks! - -Cherokee Version 0.7.1 ----------------------- - - vserver!default!rule!600!only_secure = 0 - vserver!default!rule!600!handler = cgi - vserver!default!rule!600!handler!error_handler = 1 - vserver!default!rule!600!handler!check_file = 1 - vserver!default!rule!600!handler!script_alias = - /usr/local/werc/bin/werc.rc - vserver!default!rule!600!handler!pass_req_headers = 0 - vserver!default!rule!600!match = directory - vserver!default!rule!600!match!directory = /code - vserver!default!rule!600!match!final = 1 - - -Cherokee Version 0.5.3 ----------------------- - - Directory /code { - Handler cgi { - Scriptalias /usr/local/werc/bin/werc.rc - } - } - - -Isn't progress wonderful? diff --git a/sites/werc.cat-v.org/docs/web-server-setup/hiawatha.md b/sites/werc.cat-v.org/docs/web-server-setup/hiawatha.md @@ -1,16 +0,0 @@ -Hiawatha Web Server Configuration ---------------------------------- - -Contributed by sqweek, thanks! - -This are the relevant bits: - - CGIhandler = /usr/local/plan9/bin/rc:rc - ExecuteCGI = yes - RewriteURL = werc - UrlRewrite { - RewriteID = werc - Match ^(/code|/index|/contact|/clique).* Rewrite /werc.rc - Match ^/$ Rewrite /werc.rc - } - diff --git a/sites/werc.cat-v.org/docs/web-server-setup/lighttpd.md b/sites/werc.cat-v.org/docs/web-server-setup/lighttpd.md @@ -1,44 +0,0 @@ -Setup werc with lighttpd -======================== - -You will need to enable to the following modules: `mod_cgi`, `mod_alias` and `mod_rewrite` (for non-minimal configurations). - -You can also find `mod_setenv` useful to change werc's environment ($PATH in perticular) - -Minimal setup -------------- -This is the most minimal setup, for a single domain, and lets werc handle static files. - - $HTTP["host"] =~ "^test\.cat-v\.org$" { - index-file.names = ( ) - server.error-handler-404 = "/werc.rc" - alias.url += ( "/werc.rc" => "/var/www/cat-v.org/bin/werc.rc" ) # Here use the path to werc.rc in your system. - cgi.assign += ( ".rc" => "") - server.dir-listing = "disable" - } - -Advanced setup --------------- - -A more ellaborate setup, using virtual hosts to handle multiple domains, and -alias to let lighttpd handle static files. Also show how to add external cgi's -to the setup, in this case Mercurial's web interface. - - $HTTP["host"] =~ "^((harmful|9p|gsoc|doc|uriel|src|repo|www|)(\.|)cat-v\.org|(www\.)?binarydream.org|)$" { - - index-file.names = ( ) - evhost.path-pattern = "/var/www/cat-v.org/sites/%3.%0/" - server.error-handler-404 = "/werc.rc" - - alias.url += ( "/pub/" => "/var/www/cat-v.org/pub/" ) - alias.url += ( "/favicon.ico" => "/var/www/cat-v.org/pub/default_favicon.ico" ) - alias.url += ( "/doc/" => "/var/www/cat-v.org/sites/doc.cat-v.org/" ) - alias.url += ( "/werc.rc" => "/var/www/cat-v.org/bin/werc.rc" ) - alias.url += ( "/debug.rc" => "/var/www/cat-v.org/bin/debug.rc" ) - cgi.assign += ( ".rc" => "") - server.dir-listing = "disable" - - cgi.assign += ( ".cgi" => "") - url.rewrite-once = ( "/hg/(.*)" => "/hg/hgwebdir.cgi/$1" ) - alias.url += ( "/hg/" => "/var/www/cat-v.org/bin/" ) - } diff --git a/sites/werc.cat-v.org/docs/web-server-setup/nginx.md b/sites/werc.cat-v.org/docs/web-server-setup/nginx.md @@ -1,96 +0,0 @@ -Setup werc with NGINX -===================== - -You probably will want to to use fcgiwrap, called from spawn-fcgi or similar. - -Here is an extremely basic nginx configuration, with this configuration static files will be handled by werc and not nginx, this is clearly dumb, but works: - - worker_processes 1; - - #error_log logs/error.log; - #error_log logs/error.log notice; - error_log logs/error.log info; - - pid logs/nginx.pid; - - events { - worker_connections 1024; - } - - - http { - include mime.types; - default_type application/octet-stream; - - #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - # '$status $body_bytes_sent "$http_referer" ' - # '"$http_user_agent" "$http_x_forwarded_for"'; - - #access_log logs/access.log main; - - sendfile on; - #tcp_nopush on; - - #keepalive_timeout 0; - keepalive_timeout 65; - - #gzip on; - - server { - listen 80; - server_name test.cat-v.org; # Replace with your domain name. - - #charset utf-8; - - #access_log logs/host.access.log main; - - location / { - - # FastCGI params, usually stored in fastcgi_params - # and imported with a command like the following: - #include fastcgi_params; - - # Typical contents of fastcgi_params (inlined here): - fastcgi_pass localhost:9000; - - fastcgi_param QUERY_STRING $query_string; - fastcgi_param REQUEST_METHOD $request_method; - fastcgi_param CONTENT_TYPE $content_type; - fastcgi_param CONTENT_LENGTH $content_length; - - #fastcgi_param SCRIPT_FILENAME /var/www/werc/bin/werc.rc; - fastcgi_param SCRIPT_NAME /var/www/werc/bin/werc.rc; - #fastcgi_param SCRIPT_NAME $fastcgi_script_name; - - fastcgi_param REQUEST_URI $request_uri; - fastcgi_param DOCUMENT_URI $document_uri; - fastcgi_param DOCUMENT_ROOT $document_root; - fastcgi_param SERVER_PROTOCOL $server_protocol; - - fastcgi_param GATEWAY_INTERFACE CGI/1.1; - fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; - - fastcgi_param REMOTE_ADDR $remote_addr; - fastcgi_param REMOTE_PORT $remote_port; - fastcgi_param SERVER_ADDR $server_addr; - fastcgi_param SERVER_PORT $server_port; - fastcgi_param SERVER_NAME $server_name; - fastcgi_param REMOTE_USER $remote_user; - - #root /var/www/werc/sites/$server_addr; # XXX This doesn't work, not sure why :( - root /; - #index index.html index.htm; - } - } - } - - -Then you can use spawn-fcgi or similar to get wrapcgi going: - - spawn-fcgi -a 127.0.0.1 -p 9000 -f /home/uriel/dvl/ext/fcgiwrap/fcgiwrap # Use the path to your fcgiwrap binary here - - -Other Setups ------------- - -More elaborate setups with direct handling of static files, caching, and multiple fcgi/cgi handlers should be easy, if you have any please post them to the werc9 mailing list. diff --git a/sites/werc.cat-v.org/docs/web-server-setup/nhttpd.md b/sites/werc.cat-v.org/docs/web-server-setup/nhttpd.md @@ -1,60 +0,0 @@ -Nhttpd/Nostromo Web Server Configuration for Werc -================================================== - -Contributed by nsz, thanks! - -The last two sections are relevant: aliases (to make non-content site material, -like css, available) and virtual hosts (the document root is set to `werc.rc` -so it will handle every request). - - # MAIN [MANDATORY] - - servername main.host.com - serveradmin admin[at]mail.com - serverroot /var/nostromo - servermimes conf/mimes - logpid logs/nhttpd.pid - logaccess logs/access_log - docroot /var/nostromo/htdocs - docindex index.html - - # SETUID [RECOMMENDED] - - user nhttpd - - # BASIC AUTHENTICATION [OPTIONAL] - #... - - # SSL [OPTIONAL] - #... - - # CUSTOM RESPONSES [OPTIONAL] - #... - - # HOMEDIRS [OPTIONAL] - #... - - # ALIASES [OPTIONAL] - - /pub /path/to/werc/pub - # The following line doesn't work because nhttpd doesn't support file aliases yet. - #/favicon.ico /path/to/werc/pub/default_favicon.ico - - # VIRTUAL HOSTS [OPTIONAL] - - vhost1.com /path/to/werc/bin/werc.rc - vhost2.com /path/to/werc/bin/werc.rc - #... - -To use werc on `main.host.com` as well just set `docroot` to `/path/to/werc/bin/werc.rc` -and set `docindex` to empty string. - -There was a bug in nhttpd <=1.9, it did not set `SERVER_NAME` properly (left it `main.host.com`). -To solve this problem just add a - - SERVER_NAME=$HTTP_HOST - -line somewhere at the top of `werc.rc`. - - - diff --git a/sites/werc.cat-v.org/docs/web-server-setup/plan-9-httpd.md b/sites/werc.cat-v.org/docs/web-server-setup/plan-9-httpd.md @@ -1,53 +0,0 @@ -Setup werc with Plan 9's httpd -============================== - - -There are two main options, you can use Russ Cox's magic to cgi translator -(found in his contrib dir as cgi.c), or you can use the following script which -while simpler, it also lacks some features at the moment. - -Thanks to soul9 for the original idea of wrapping werc in a shell script that -would setup a cgi-like environment! - - - #!/bin/rc - - SERVER_NAME=$2 - REQUEST_URI=`{echo $*(15)} - REQUEST_URI=$REQUEST_URI(2) - REQUEST_URI=/ - REQUEST_METHOD=$*(16) - PLAN9=/ - - - echo 'HTTP/1.0 200 Ok - Connection: close - Server: werc/9.9.9' # This is whatever you like - - - cd /usr/web/bin/ - rfork - /bin/rc < ./werc.rc >[2]/usr/glenda/tmp/w/log # Use whatever location you like to log stderr, but make sure it is writable by none. - -Call this script werc-wrap, and put it in /rc/bin/ip/httpd/ - -Then in your /sys/lib/httpd.rewrite add a line like: - - /w @/magic/werc-wrap - -And this will run werc for all stuff under /w. Note that apparently httpd is -incapable of internally remapping the root directory, so until a solution is -found for this, you will have to keep your site in a sub-directory of the web -server root. - -In your /lib/namespace.httpd you probably will want to add something along the -following lines to bind the werc directory into the httpd's namespace: - - bind -b /usr/glenda/src/werc/ /usr/web/ - bind /usr/glenda/src/werc/bin/ /usr/web/magic/ - - -**Notes**: This is experimental and work in progress, there are a couple of issues -with the werc code itself that might need fixing, in particular you will need -to replace the '%($"extraHeaders%)' in lib/headers.tpl with '% echo -$"extraHeaders' no clue why. diff --git a/sites/werc.cat-v.org/index.md b/sites/werc.cat-v.org/index.md @@ -1,104 +0,0 @@ -werc - A sane web anti-framework -================================ - -Werc is a minimalist web anti-framework built following the [Unix](http://doc.cat-v.org/unix/) and [Plan 9](http://plan9.cat-v.org) -*tool philosophy* of software design. - -Werc avoids the pain of managing collections of websites and developing web -applications. - -* Database free, uses files and directories instead. -* Written using [the rc shell](http://rc.cat-v.org), leveraging the standard Unix/Plan 9 command toolkit. -* Minimize tedious work: eg., no need to ever write HTML, use markdown (or any other format) instead. -* Very minimalist yet extensible codebase: highly functional core is 150 lines, with extra functionality in modular [apps](/apps/). - - -Features --------- - -Here are some of the features provided by werc: - -* Good integration with pre-existing content, you can add HTML or plain text files and they will be seamlessly integrated with the rest of the site. -* You can use your favorite tools (text editor, shell, file manager, etc) to edit, manipulate and manage data stored in werc. -* Designed to manage any number of 'virtual' domains that share a common style and layout from a single werc installation. -* Configuration and customization can be at at any level: global, per-domain-group, domain-wide, directory sub-tree, and single file. -* Can trivially run multiple (customized) versions of werc side by side. -* Very simple and flexible user management and permissions system. -* Applications can be easily combined: eg., add comments to your blog or wiki by enabling the 'bridge' app; or by enabling the 'diridir' wiki convert any document tree into a wiki. -* Can easily write werc 'apps' and extensions in *any* language! (But of course, rc is recommended). - - -Install Requirements --------------------- - -All you need is some Plan 9 commands (cat, grep, sed, rc, etc.), and an HTTP -server with CGI support. - -Werc runs on any Unix-like system where [Plan 9 from User Space](http://plan9.us) -is available (this includes Linux, *BSD, OS X and Solaris), and on Plan 9. - -If you use Debian you can install the `9base` package that will provide all the -required commands (but at the moment you need to install the version in *sid*, -older versions in stable lack some of the required programs) - -Werc can use any HTTP server that can handle CGI, and has been tested with at -least Apache, Lighttpd, Cherokee, nhttpd, Hiawatha, and others. - -Werc uses markdown by default (and the standard Perl markdown is included with -the distribution), to format documents, but any other formatting system can be -used. - - -Source ------- - -To get a copy of the latest stable code using mercurial, do: - - hg clone http://hg.cat-v.org/werc/ - -You can also [browse the online repository](http://gsoc.cat-v.org/hg/werc/). - -The latest development branch is located at http://gsoc.cat-v.org/hg/werc-dev/ - - -Contact -------- - -For questions, suggestions, bugrepports and contributing patches you can join -the [werc9 mailinglist](http://groups.google.com/group/werc9). - -On irc, join [#cat-v](irc://irc.freenode.org/cat-v) on irc.freenode.org - - -Links ------ - -* [werc project at freshmeat](http://freshmeat.net/projects/werc/) - You can get new release notifications there. -* [werc project at ohloh](https://www.ohloh.net/p/werc/) - - -License -------- - -Public domain, [because so called 'intellectual property' is an -oxymoron](http://harmful.cat-v.org/economics/intellectual_property/). - -Alternatively if your prefer it or your country's brain dead copyright law -doesn't recognize the public domain werc is made available under the terms of -the MIT and ISC licenses. - - -Credits -------- - -Thanks to Kris Maglione (aka JG) for implementing rss feeds, for writing the -awk rc-templating system, and other help and inspiration (some parts of the -code were based on JG's diri wiki). - -Thanks to Mechiel (aka oksel) for the md_cache script. - -Thanks Garbeam (aka arg) for writing the original diri code and showing that -writing complex web apps in rc was feasible. - -And thanks to everyone else whom I have forgotten and that has provided fixes -and feedback. diff --git a/sites/werc.cat-v.org/testimonials.md b/sites/werc.cat-v.org/testimonials.md @@ -1,8 +0,0 @@ -Comments from Werc Fans -======================= - -*When people ask me what I look for in a woman, I'm going to say, "werc-like qualities".* -- shardz - -*Okay, werc gets my official Mark of Sweetness. This is really damn nice.* -- Athas - -*Thanks to [Uriel](http://uriel.cat-v.org) and co. for providing the wonderful werc framework.* -- sleepydog, maintainer of Xpilot-AI [http://www.reddit.com/r/programming/comments/9m2nl/xpilotai_development_of_autonomous_agents_in/c0dch6s] diff --git a/sites/werc.cat-v.org/wiki/_werc/config b/sites/werc.cat-v.org/wiki/_werc/config @@ -1 +0,0 @@ -conf_enable_wiki