Changeset 1887

Show
Ignore:
Timestamp:
02/03/07 23:48:24 (1 year ago)
Author:
moseley
Message:

Update the script to generate httpd.conf
refresh the README to better describe the process of building the

site from scratch

TODO:

update the search script to search the archive -- so
there's only one script.

I finally realized why the archive search was separate and why
the hypermail archive was so ugly -- because the docs need to be
available locally in the distribution. So the external style sheet
won't work.

Also, at one time there was a "make search" Makefile target where someon
could index their local docs. The website archive search used this, too.
Good way to test that it works. So, need to look at how the docs are
available in the tarball (style sheets, headers, graphics, etc.)
Might be smart to use a different set of templates when generating
the tarball docs.

Yuck.

Looks like the site isn't going to get updated this weekend after all.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • swish_website/README

    r1886 r1887  
    88to review and then check in. 
    99 
     10Prerequisites 
     11------------- 
     12 
     13    HTML-Parser-3.56 
     14    HTML-Tree-3.23 
     15    HTML-FillInForm-1.06 
     16    hypermail-2.1.8 
     17    Pod-POM-0.17 
     18    swish-e-2.4.5 
     19    Template-Toolkit-2.15 
     20 
     21There are likely other dependencies, depending on your systems base 
     22configuration. 
     23 
     24Note, the versions were the current CPAN versions and don't necessarily reflect 
     25dependencies. 
     26 
     27 
    1028Overview 
    1129-------- 
    1230 
    1331The website generation has a few dependencies.  There are scripts to generate 
    14 the various parts. 
     32the various parts.  Here's an overview of what's needed before the site can be 
     33generated. 
    1534 
    1635    - swish-e current release source 
     
    2140 
    2241    - archive (hypermail) 
     42        Not actually required to build the site, as the site just 
     43        points to the hypermail archive.  But, might in the future 
     44        use a single script to display the archive then it would be 
     45        a true dependency. 
     46 
    2347        currently, procmail feeds new posts to hypermail to 
    2448        add new posts to the archive.  The posts are also archived 
    2549        in the "mbox" directory by month in mbox format. 
    2650 
    27     - archive index 
     51    - indexes 
    2852        When the archive is updated a flag is set and then cron 
    29         can re-index the hypermail archive. 
     53        can re-index the hypermail archive.  Also, the index of 
     54        the site is needed, but first need the site... 
    3055 
    3156    - swish-daily 
     
    4166------------------- 
    4267 
    43     /<top level dir> 
     68    A "top level dir" contains a number of directories.  This top level 
     69    directory will be called $ROOT below. 
     70 
     71    $ROOT/ 
    4472 
    4573        swish_daily_build/          - where the daily builds are created 
     
    5583        indexes/                    - indexes for the archive and website 
    5684 
    57         swish_website/              - source for building the site (more below) 
    58  
    5985        pubilc_html                 - bulk of generated website. 
    6086 
    6187 
    62     Apache's DocumentRoot is pubilc_html, and swish-daily and distribution 
    63     are Aliased.  See httpd.conf. 
     88    Of those directories, public_html is the site's Document Root, 
     89    and "archive", "distribution", and "swish-daily" are aliased 
     90    in the Apache configuration. 
     91 
     92    The names of the directors do not have to be as shown above and don't 
     93    even need to all be under the same directory.  But, if the names above 
     94    are used then the site build script can be invoked with simpler arguments. 
     95 
     96 
    6497 
    6598 
     
    73106    But, to build a daily tarball that include the HTML docs the website code 
    74107    needs to be installed. 
     108 
     109    So, the swish_website needs to be checked out from subversion first. 
    75110 
    76111    The swish-e configure script looks for the program "build-swish-docs" in the 
     
    92127        The website isn't generated yet, but the code is needed before 
    93128        building the daily tarballs. 
     129 
     130        This example places swish_website below $ROOT.  This is not a requirement, 
     131        but is nice if you want to keep everything in one place. 
    94132 
    95133            cvn co http://svn.swish-e.org/swish_website/ $ROOT/swish_website 
     
    192230 
    193231 
     232 
     233    public_html 
     234    ----------- 
     235        Now the website can be created.  The bin/build script is used 
     236        to generate the website.  The script will detect when files 
     237        need to be generated, or passing --all will tell it to generate 
     238        the complete site. 
     239 
     240        There are a lot of options, and running build --help will list them. 
     241        The same build script is used when building from cvs to generate the 
     242        html docs for the tarball. 
     243 
     244        If the directories above are all in $ROOT and use the same names as 
     245        above, then the script can be called like this: 
     246 
     247            $ROOT/swish_website/bin/build --root $ROOT --all 
     248 
     249        (The --all is optional) 
     250 
     251        This is the same as calling the script and explicitly setting 
     252        all the directories: 
     253 
     254 
     255            $ROOT/swish_website/bin/build \ 
     256                --dest      $ROOT/public_html \ 
     257                --indexes   $ROOT/indexes \ 
     258                --swishsrc  $ROOT/swish_release_build/latest_swish_build/source \ 
     259                --develsrc  $ROOT/swish_daily_build/latest_swish_build/source \ 
     260                --download  $ROOT/distribution \ 
     261                --daily     $ROOT/swish-daily \ 
     262                --all 
     263 
     264 
     265 
     266        httpd.conf 
     267        ---------- 
     268 
     269            Setting up Apache is just a matter of pointing 
     270            Apache at public_html, and creating aliases 
     271            for the distribution, swish-daily, and the archive directories. 
     272 
     273            The same bin/build script can be used to generate an httpd.conf file. 
     274 
     275                $ROOT/swish_website/bin/build --root $ROOT --apache > httpd.conf 
     276 
     277 
     278            For debugging locally, say just the web site 
     279 
     280 
     281                $ROOT/swish_website/bin/build \ 
     282                    --root      $ROOT \ 
     283                    --apache    \ 
     284                    --port      8080 \ 
     285                    --ipaddr    `hostname` \ 
     286                    --domain    `hostname` \ 
     287                    --nodev_site \ 
     288                    --nolists_site \ 
     289                    --nosvn_site \ 
     290                > httpd.test 
     291 
     292            The only reason to disable sites might be if you don't have 
     293            the modules installed locally. 
     294 
     295 
     296 
    194297    indexes 
    195298    ------- 
     
    198301        another for the website. 
    199302 
    200         The web site is not created yet, so it cannot be indexed. 
     303 
     304        This create the index of the archive 
    201305 
    202306            mkdir $ROOT/indexes 
     
    214318 
    215319 
    216     public_html 
    217     ----------- 
    218         Now the website can be created.  The bin/build script is used 
    219         to generate the website.  The script will detect when files 
    220         need to be generated, or passing --all will tell it to generate 
    221         the complete site. 
    222  
    223         There are a lot of options, and running build --help will list them. 
    224         The same build script is used when building from cvs to generate the 
    225         html docs for the tarball. 
    226  
    227         The site must be told where to find all the directories created above. 
    228         It determines where the source files are relative to the location of the 
    229         script, but must be told everything else: 
    230  
    231  
    232             $ROOT/swish_website/bin/build \ 
    233                 --dest=$ROOT/public_html \ 
    234                 --archive=$ROOT/indexes \ 
    235                 --swishsrc=$ROOT/swish_release_build/latest_swish_build/source \ 
    236                 --develsrc=$ROOT/swish_daily_build/latest_swish_build/source \ 
    237                 --download=$ROOT/distribution \ 
    238                 --daily=$ROOT/swish-daily \ 
    239                 --all 
    240  
    241  
    242         Luckily, there's a build script that does all that, and also indexes 
    243         the site. 
    244  
    245  
    246         indexes -- part 2 
    247         ----------------- 
    248  
    249             Once the site is it's time to build the index of the web site. 
    250  
    251  
    252  
    253  
    254  
    255  
    256  
    257  
    258  
    259  
    260  
    261  
    262  
    263  
    264  
    265  
    266  
    267  
    268  
    269 Site layout 
    270 ----------- 
     320        This creates the index of the website.  The site is spidered, 
     321        so Apache must be running. 
     322 
     323        This uses the spider installed with swish-e -- and runs the spider 
     324        via the swish config (instead of piping the spider's output to swish). 
     325        Therefore, must cd to the website directory: 
     326 
     327 
     328            cd $ROOT/swish_website && \ 
     329            SWISH_SITE=http://bumby.com:8080 \ 
     330            SPIDER_QUIET=1 \ 
     331            swish-e \ 
     332                -c etc/swish.config \ 
     333                -f $ROOT/indexes/index.swish-e \ 
     334                -S prog \ 
     335                -v0 
     336 
     337 
     338 
     339 
     340 
     341 
     342Crontab 
     343------- 
     344 
     345TODO 
     346    Cron is used for a number of tasks.  The user running cron needs to 
     347    have write access to the $ROOT directory. 
     348 
     349    Cron is used for: 
     350 
     351        1) create the daily builds 
     352        2) cvs update the website and rebuild if necessary (including reindexing) 
     353        3) cvs update an rebuild the website nightly using --all, just for good measure 
     354        4) reindex when new archives messages have been added 
     355 
     356 
     3578,15,37,45 * * * *      . $HOME/.bashrc && rm time_to_index 2>/dev/null && cd swish/search && perl index_hypermail.pl ../archive | swish-e -c swish.conf -S prog -i stdin -v0 
     35833 3-19 * * *           . $HOME/.bashrc && cd $HOME/swish/swish_website && ./build.sh 
     35955 1 * * *              . $HOME/.bashrc && swish-daily.pl --tardir=$HOME/swish/swish-daily --topdir=$HOME/swish/swish_daily_build || echo "Check Swish Daily Build" 
     36020 2 * * *              . $HOME/.bashrc && cd $HOME/swish/swish_website && ./build.sh -all 
     361 
     362 
     363 
     364Procmail 
     365-------- 
     366 
     367TODO 
     368 
     369    Procmail is used to look for email messages from the swish-e list. 
     370    A message is saved to the mbox directory and piped to hypermail 
     371    to be included in the html archive.  A flag is set to let cron 
     372    know that the archive needs to be re-indexed. 
     373 
     374#  ===== Debugging Settings ======== 
     375 
     376    # Set log file location 
     377    LOGFILE=$HOME/procmail.log 
     378 
     379    # Set on for debug -- Extended diags 
     380    # Options: VERBOSE=off|on 
     381    VERBOSE=off 
     382 
     383 
     384    # Writes From_ and Subject, deliver folder, and length if on 
     385    # Options: LOGABSTRACT=all|no 
     386    LOGABSTRACT=all 
     387 
     388SHELL=/bin/sh 
     389HYPERMAIL=/home/bmoseley/local/bin/hypermail 
     390ARCHIVE_DIR=/home/bmoseley/swish 
     391FILENUM=`/bin/date -u +%Y%m` 
     392 
     393 
     394:0 
     395* ^TOusers@lists.swish-e.org 
     396
     397        # chdir to the archive directory 
     398        MAILDIR=$ARCHIVE_DIR 
     399 
     400        # Save the archived mbox message 
     401        :0wc: 
     402        | gzip -c >> mbox/swish_$FILENUM.gz 
     403 
     404        # update the hypermail archive 
     405        # This probably should be done with cron, not when the mail comes in. 
     406        :0wc 
     407        | $HYPERMAIL -i -u -c hypermailrc -d archive 
     408 
     409        # Set flag that it needs to be indexed 
     410        :0ih 
     411        | touch $HOME/time_to_index 
     412
     413 
     414:0 
     415! moseley@hank.org 
     416 
     417 
     418 
     419Note: Sat Feb  3 20:36:10 PST 2007 
     420        Some of the content below has not be reviewed 
     421        and may be inaccurate. 
     422 
     423 
     424 
     425swish_website layout 
     426-------------------- 
     427 
     428    Here's an overview of the files that are used to build the website. 
    271429 
    272430    ./ 
    273431        -> src              - web source docs. 
    274         -> public_html      - output files.  This is DocumentRoot 
    275             distribution        - symlink to the swish-releases tarball directory[1] 
    276             swish-daily         - symlink to swish-daily tarball directory 
    277432        -> bin              - bin/build script and other utilities 
    278433        -> lib/config       - site config templates. 
     
    282437        -> lib/pod_toc      - top-level index for pod docs 
    283438 
    284 [1] these two (three including the "old" dir) directories are read when 
    285 building the index listings for the downloads, plus they must be available via 
    286 the /distribution and /swish-daily URLs.  Originally, these were outside of 
    287 document root (public_html) in dirs_public and accessed with Alias in 
    288 httpd.conf.  And lib/config/site set their locations for generating the 
    289 index.html pages listing the files. 
    290  
    291  
    292 Requirements 
    293 ------------ 
    294  
    295     Swish-e must be installed on the system and the program 
    296     swish-config must be in the path -- this is used to find where 
    297     helpers (e.g. perl modules) are installed. 
    298  
    299  
    300 Building the site 
    301 ----------------- 
    302  
    303     Check out the "swish_website" project from CVS.  Once checked out you need to 
    304     initialize a few directories, and then build the site. 
    305  
    306         $ cd swish_website 
    307         $ mkdir -p public_html dirs_public/download/old dirs_public/swish-daily 
    308         $ bin/build -swishsrc=$HOME/swish-e -develsrc=$HOME/swish-e -archive=archive/index.swish-e 
    309  
    310     (Or symlink as needed -- which is what I did.) 
    311  
    312     Also in lib/config/site you might want to define where swish-daily and 
    313     the download dirs are set.  Currently to /distribution and /swish-daily. 
    314     The download and swish-daily pages link files to those dirs. 
    315  
    316     You need Template Toolkit, Pod::POM (from CPAN) and anything else it 
    317     complains about. 
    318  
    319     Those output directories can be overridden.  see bin/build --help  for 
    320     help.  "dirs_public" can be set in lib/conifg/site. 
    321  
    322     From the top-level directory* (where this README file is located) 
    323     run: 
    324  
    325         bin/build -all -swishsrc=$HOME/swish-e -v 
    326  
    327     (assuming that's where the swish-e source is located) 
    328  
    329     That builds both the website and the pod docs and writes them 
    330     to the "public_html" directory. 
    331  
    332     * Actually, from anywhere -- directories are determined relative to 
    333     where the /bin/build program is found. 
    334  
    335     Running without the -all switch will cause only the changed files to be 
    336     rebuilt.  Normally you run with -all. 
    337  
    338     Note: the docs/index.html file can only be correctly built if ALL the pods 
    339     are processed (using -all).  So do not rm public_html/docs/index.html and expect 
    340     it to be rebuilt automatically. 
    341  
    342     For a bit more info, run: 
    343  
    344         bin/build -help 
    345439 
    346440 
  • swish_website/bin/build

    r1886 r1887  
    44use warnings; 
    55use FindBin qw'$Bin $RealBin'; 
     6use Template; 
    67 
    78 
     
    7273 
    7374 
     75my @argv = @ARGV;  # save for later. 
     76 
     77 
     78my %default_paths = (  # relative to --root 
     79    dest        => 'public_html', 
     80    indexes     => 'indexes', 
     81    swishsrc    => 'swish_release_build/latest_swish_build/source', 
     82    develsrc    => 'swish_daily_build/latest_swish_build/source', 
     83    download    => 'distribution', 
     84    daily       => 'swish-daily', 
     85    archive     => 'archive', 
     86); 
     87 
     88 
     89 
    7490 
    7591my %default_config = ( 
    76     ignore  => [ '.svn', '\b(CVS|RCS)\b', '^#', '\.gz$', '\.swp$'], 
    77     copy    => [ '\.(pdf|gif|png|jpe?g|htaccess)$' ], 
    78     include => ['lib' ], 
    79     src     => $src_default, 
    80     # dest    => $dest_default, 
    81     # poddest => $poddest_default, 
    82     websitesrc => 'src'  # default website source directory relative to -src 
     92    ignore      => [ '.svn', '\b(CVS|RCS)\b', '^#', '\.gz$', '\.swp$'], 
     93    copy        => [ '\.(pdf|gif|png|jpe?g|htaccess)$' ], 
     94    include     => ['lib' ], 
     95    src         => $src_default, 
     96    websitesrc  => 'src',  # default website source directory relative to -src 
    8397                          # added to INCLUDE_PATH 
     98    web_site    => 1, 
     99    dev_site    => 1, 
     100    lists_site  => 1, 
     101    svn_site    => 1, 
    84102); 
    85103 
     
    91109$0 usage: 
    92110 
    93     1) build complete website (including pods) 
    94  
    95             $0 -swishsrc=\$HOME/swish-e 
    96  
    97        which, with showing the defaults, is the same as 
    98  
    99             $0 \\ 
    100                 --swishsrc=\$HOME/swish-e \\ 
    101                 --src=$default_config{src} \\ 
    102                 --dest=$default_config{dest} \\ 
    103                 --poddest=$default_config{poddest} 
    104  
    105     2) build just website without pods 
    106  
    107             $0 
    108  
    109         which uses defaults as above but without specifying the source for pods. 
    110  
    111  
    112     3) build pods in a separate location (skips website) 
    113  
    114             $0 --swishsrc=\$HOME/swish-e --poddest=\$HOME/swish-e/html 
    115  
    116         If --poddest is not set to \$src/docs (the default) then menu links  
    117         to non-pod files will point to http://swish-e.org.  Needed for stand-along 
    118         processing. 
    119  
    120  
    121  
     111This script is used to build the swish-e website.  It is 
     112also used to build the html documentation from the subversion 
     113repository for the swish-e release tarball. 
     114 
     115Please see the README for details of building the site, but in 
     116short, to build the site: 
     117 
     118    bin/build --root \$ROOT --all 
     119 
     120Will build the site, but assumes all required directories are 
     121located in \$ROOT, and the website will also be output \$ROOT/public_html. 
     122 
     123As mentioned above, just the documentation can be written using this 
     124program.  Use the --poddest options along to just write the pods. 
     125When --poddest doesn't not fall within the location of the website the 
     126program assumes it's writing docs for the tarball, and links are adjusted 
     127to point to the main swish-e website. 
     128 
     129Options: 
     130 
     131    -root=<dir>     = If set, will try and set all the following 
     132                      using defaults below the directory specified. 
     133                      See README. 
     134    -all            = don't check timestamps on destination files 
     135                      Will generate all files, not just ones with 
     136                      dates newer than the output files. 
     137    -verbose        = verbose 
     138    -debug          = eh, debuging output 
     139    -dryrun         = Don't write output file. 
     140 
     141 
     142    If not using the default locations, these can be set specifically: 
     143 
     144    -dest=<dir>     = destination directory for website 
     145    -indexes=<dir>  = Path to directory where indexes are stored 
     146    -swishsrc=<dir> = toplevel directory of swish-e source package 
     147    -develsrc=<src> = Directory of development. 
     148    -download=<dir> = Path to directory where downloads are located 
     149    -daily=<dir>    = Path to directory where daily builds are located 
     150    -archive=<dir>  = Path to the hypermail archive 
     151 
     152    -- Normally not needed -- 
    122153    -src=<dir>      = top-level directory of website source 
    123154                      Default: $default_config{src} 
    124155                      \$src/src and \$src/lib are INCLUDE_PATH 
    125     -dest=<dir>     = destination directory for website 
    126                       Default: $default_config{dest} 
    127     -swishsrc=<dir> = toplevel directory of swish-e source package 
    128156    -poddest        = where pods are stored (must set -swishsrc) 
    129157                      Setting poddest will disable website generation 
    130                       Default: $default_config{poddest} 
    131158    -podonly        = says do not write website files, only pod files 
    132159                      (set automatically when -poddest != website dir 
    133     -all            = don't check timestamps on destination files 
    134     -verbose        = verbose 
    135     -debug          = eh, debuging output 
    136     -dryrun         = Don't write output file. 
     160 
    137161    -websitesrc     = default dir where website src content is located 
    138162                      Default: $default_config{websitesrc} 
    139163                      Should never be used. 
    140164 
    141     -develsrc=<src> = Directory of development. 
    142  
    143     -archive=<dir>  = Path to directory where indexes are stored 
    144     -download=<dir> = Path to directory where downloads are located 
    145     -daily=<dir>    = Path to directory where daily builds are located 
    146165 
    147166    -- options you don't need -- 
     
    153172 
    154173 
     174    -- Apache config file generation - 
     175    (Defaults are set in the template and may not match below) 
     176 
     177    -apache         = Only generate Apache configuration file. 
     178                      The file is sent to stdout. 
     179 
     180    domain          = Override the domain name [swish-e.org] 
     181    module_dir      = Location of Apache modules [modules] 
     182    user            = Apache user [apache] 
     183    group           = Apache group [apache] 
     184    logs            = Location of log files [logs] 
     185    pid_file        = Location of apache pid file [run/httpd.pid] 
     186    ipaddr          = IP address for Listen statement [*] 
     187    port            = Port to listen on [80] 
     188    trac_doc_root   = Path do DocumentRoot for trac [/opt/trac/htdocs] 
     189    trac_env        = Trac environment [/opt/trac] 
     190    trac_password   = Trac password file [/opt/svn/swish/conf/dav_svn.passwd] 
     191    svn_repo        = Path to Subversion Repository [/opt/svn/swish] 
     192 
     193    web_site        = Boolean to include website [true] 
     194    dev_site        = Boolean to include trac site [true] 
     195    lists_site      = Boolean to include mailman site [true] 
     196    svn_site        = Boolean to include svn repo [true] 
     197 
     198 
    155199    Script exits false (1) if no files are actually processed. 
    156200    Exits false even if -all -dryrun is used. 
     
    164208 
    165209my @options = qw( 
    166         src=s 
    167         dest=s 
    168         swishsrc=s 
    169         poddest=s 
    170         verbose|v 
    171         debug 
    172         all|a 
    173         ignore=s@ 
    174         copy=s@ 
    175         include=s 
    176         podonly 
    177         dryrun|n 
    178         websitesrc=s 
    179         abslinks 
    180         develsrc=s 
    181         archive=s 
    182         download=s 
    183         daily=s 
    184         check 
     210    src=s 
     211    dest=s 
     212    root=s 
     213    swishsrc=s 
     214    poddest=s 
     215    verbose|v 
     216    debug 
     217    all|a 
     218    ignore=s@ 
     219    copy=s@ 
     220    include=s 
     221    podonly 
     222    dryrun|n 
     223    websitesrc=s 
     224    abslinks 
     225    develsrc=s 
     226    indexes=s 
     227    download=s 
     228    daily=s 
     229    check 
     230 
     231    apache 
     232    domain=s 
     233    module_dir=s 
     234    user=s 
     235    group=s 
     236    logs=s 
     237    pid_file=s 
     238    ipaddr=s 
     239    port=i 
     240 
     241    trac_doc_root=s 
     242    trac_env=s 
     243    trac_password=s 
     244 
     245    svn_repo=s 
     246 
     247    web_site! 
     248    dev_site! 
     249    lists_site! 
     250    svn_site! 
     251 
    185252); 
    186253 
     
    205272 
    206273 
     274 
     275# Set defaults 
     276 
     277if ( $config->{root} )  { 
     278    my $root = File::Spec->rel2abs( $config->{root} ); 
     279 
     280    for my $option ( keys %default_paths ) { 
     281        next if $config->{$option}; 
     282        my $dir = File::Spec->catfile( $root, $default_paths{$option} ); 
     283 
     284        if ( -d $dir ) { 
     285            $config->{$option} = $dir; 
     286        } else { 
     287            warn "Could not set option '--$option=$dir': $!\n"; 
     288        } 
     289    } 
     290} 
     291 
     292 
     293 
    207294$config->{poddest} = File::Spec->catfile( $config->{dest}, 'docs' ) 
    208295    unless $config->{poddest}; 
     296 
     297 
     298# Generate apache config 
     299if ( $config->{apache} ) { 
     300 
     301    my $tt = Template->new( 
     302        INCLUDE_PATH => File::Spec->catfile( $config->{src}, 'etc' ), 
     303    ); 
     304 
     305    my $stash = { 
     306        %$config, 
     307        script      => $0, 
     308        arguments   => join( ' ', @argv ), 
     309    }; 
     310 
     311    my $template = $config->{template} || 'httpd.conf.tt'; 
     312 
     313    $tt->process( $template, $stash ) || die $tt->error; 
     314 
     315    exit 0; 
     316} 
     317 
    209318 
    210319 
     
    270379 
    271380 
    272     # Build include paths - reverse so -includ=foo will be pre-pended to path 
     381    # Build include paths - reverse so -include=foo will be pre-pended to path 
    273382    my @includes = map {  
    274383                    File::Spec->file_name_is_absolute( $_ ) 
     
    332441 
    333442 
    334     # Test the list archive directory 
    335     if ( $config->archive ) { 
    336         my $index = File::Spec->rel2abs( $config->archive ); 
    337         die "List archive index [$index] not a directory\n" unless -d $index; 
    338         $config->{archive} = $index; 
     443    # Test the list indexes directory 
     444    if ( $config->indexes ) { 
     445        my $index = File::Spec->rel2abs( $config->indexes ); 
     446        die "indexes setting of [$index] is not a directory\n" unless -d $index; 
     447        $config->{indexes} = $index; 
    339448    } 
    340449 
     
    760869    no strict 'refs'; 
    761870    for (@$options ) { 
    762         next unless /(^[a-zA-Z]+)/; 
     871        next unless /(^[a-zA-Z_]+)/; 
    763872        my $method = $1; 
    764873        *{$method} = sub { return shift->{$method} || undef }; 
  • swish_website/etc/swish.config

    r1601 r1887  
    99PropertyNames section 
    1010 
    11 IndexFile public_html/search/index.swish-e 
    1211 
    1312# Add these metanames to allow searching list archive, too 
  • swish_website/lib/config/site

    r1886 r1887  
    3636    swish = { 
    3737        current_version     = this.swish_current_version || '2.4.5' 
    38         index_file          = 'index.swish-e' 
    39         archive_index       = self.config.archive 
     38        index_file          = self.config.indexes _ '/archive.swish-e' 
     39        archive_index       = self.config.indexes _ '/index.swish-e' 
    4040        version             = this.swish_version 
    4141    };