From: Frank Lichtenheld Date: Thu, 12 Apr 2007 23:52:20 +0000 (+0200) Subject: static: Add a simple index page and use ttree to build and install X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=8753cac7a1334aaaf74690e3ff4d5c318fe2aefb;p=deb%2Fpackages.git static: Add a simple index page and use ttree to build and install Add a simple index page to static that we can use as homepage if we don't want to redirect to an external search form like we do on the official packages.debian.org. Also use ttree to build and install the contents of static. This allows to use TT for preprocessing. The first example of such a file is the added index file. --- diff --git a/conf/apache.conf.sed.in b/conf/apache.conf.sed.in index f1b62ab..594efd7 100644 --- a/conf/apache.conf.sed.in +++ b/conf/apache.conf.sed.in @@ -113,10 +113,11 @@ RewriteRule ^/[^/]+\.js - [L] # RewriteRule ^/$ http://www.debian.org/distrib/packages + RewriteRule ^/$ /index.html [L] RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N] RewriteRule ^/src:([^/]+)$ /source/$1 [R,L,NE] - RewriteRule ^/(.+)$ /cgi-bin/dispatcher.pl/$1 [PT] + RewriteRule ^/(.+)$ /cgi-bin/dispatcher.pl/$1 [L,PT] # In case we need to disable the site again # diff --git a/conf/ttreerc.sed.in b/conf/ttreerc.sed.in new file mode 100644 index 0000000..2470689 --- /dev/null +++ b/conf/ttreerc.sed.in @@ -0,0 +1,17 @@ +recurse +verbose + +ignore = \b(CVS|RCS|\.git|\.svn)\b +ignore = ^# +ignore = ~$ +ignore = \.sed\.in$ + +copy = \.(gif|png|jpg|pdf|css|js)$ +accept = \.tmpl$ +suffix tmpl=html + +lib = %TOPDIR%/templates +src = %TOPDIR%/static +dest = %TOPDIR%/www + +pre_process = config.tmpl diff --git a/cron.d/700install_static b/cron.d/700install_static index f30a5e1..84b6864 100755 --- a/cron.d/700install_static +++ b/cron.d/700install_static @@ -6,4 +6,4 @@ set -e test -d "$htmldir" || mkdir -p "$htmldir" -rsync -aC "$staticdir/"* "$htmldir/" +cd "$topdir" && ttree -f ./conf/ttreerc diff --git a/static/index.tmpl b/static/index.tmpl new file mode 100644 index 0000000..cbf214f --- /dev/null +++ b/static/index.tmpl @@ -0,0 +1,107 @@ +[% PROCESS 'html/head.tmpl' + title_tag = "$organisation Packages Search" + page_title = "$organisation Packages Search" + keywords = "$organisation, Packages" +%] + + +

This site provides you with information about all the packages +available in the [% organisation %] +Package archive. + +

Please contact [% admin.name %] +if you encounter any problems!

+ +

Browse through the lists of packages:

+ + + + +

There is also a list of packages +recently added to unstable.

+ +

Search

+ +

Search package directories

+ +
+ + + +
+Search on: + +   + + + + + +
+Only show exact matches: + +
+Distribution: + +Section: + +
+

There are shortcuts for some searches available:

+ +
+ +

Search the contents of packages

+ +

This search engine allows you to search the contents of [% organisation %] +distributions for any files (or just parts of file names) that are +part of packages. +You can also get a full list of files in a given package. +
+

+ + + +   + + +
+Display: +
+ + +
+ + +
+ + + + + + + + +
+ +[% PROCESS 'html/foot.tmpl' + langs.size = 0 %]