From: Justin J. Novack Date: Fri, 14 Sep 2012 17:13:36 +0000 (-0400) Subject: Configurable index page X-Git-Tag: v0.3.0~47 X-Git-Url: https://git.cweiske.de/phorkie.git/commitdiff_plain/0c2d838a9b2f0c81d460b49ccd74775440ced828 Configurable index page --- diff --git a/README.rst b/README.rst index 1047243..c94f29e 100644 --- a/README.rst +++ b/README.rst @@ -169,7 +169,7 @@ URLs ==== ``/`` - Index page. Shows form for new paste + Index page. ``/[0-9]+`` Display page for paste ``/[0-9]/edit`` @@ -188,7 +188,8 @@ URLs Search for term, with optional page ``/list(/[0-9])?`` List all pastes, with optional page - +``/new`` + Shows form for new paste Internal directory layout ========================= @@ -220,6 +221,7 @@ If you use nginx, place the following lines into your ``server`` block: rewrite ^/([0-9]+)/rev-raw/(.+)$ /raw.php?id=$1&rev=$2&file=$3; rewrite ^/([0-9]+)/tool/([^/]+)/(.+)$ /tool.php?id=$1&tool=$2&file=$3; + rewrite ^/new$ /new.php; rewrite ^/list$ /list.php; rewrite ^/list/([0-9]+)$ /list.php?page=$1; diff --git a/data/config.default.php b/data/config.default.php index 8fb27a9..c40c690 100644 --- a/data/config.default.php +++ b/data/config.default.php @@ -9,7 +9,8 @@ $GLOBALS['phorkie']['cfg'] = array( 'topbar' => '', 'setupcheck' => true, 'elasticsearch' => null, - 'geshi' => 'MediaWiki/geshi/geshi/geshi.php' + 'geshi' => 'MediaWiki/geshi/geshi/geshi.php', + 'index' => 'new' ); $GLOBALS['phorkie']['tools'] = array( '\\phorkie\\Tool_Xmllint' => true, diff --git a/data/templates/base.htm b/data/templates/base.htm index 0479cf6..b9c9608 100644 --- a/data/templates/base.htm +++ b/data/templates/base.htm @@ -20,7 +20,7 @@