<{!-- A quick demo of using WebMake to generate a news site. --}> <{!-- ------------------------------------------------------------------- --}> <{perlpostdecl # create a ${all_stories} variable containing the list # of all text files just loaded. $_ = ''; foreach my $pg (sorted_content_matching ("score title", "*.txt")) { $pg =~ s/\.txt$//; $_ .= "$pg "; } set_content ("all_stories", $_); ''; }> <{!-- ------------------------------------------------------------------- --}> $[this.title]

Sorry about the crappy formatting BTW, this is just a demo. ;)

<{!-- ------------------------------------------------------------------- --}>
  • $[${item}.txt.title]

    $[${item}.txt.abstract]

    • <{perl make_list ('index_list_item', split (' ', get_content ("all_stories"))); }>
    <{!-- ------------------------------------------------------------------- --}> ${header}${${pg}.txt}${footer} ${header}${index_chunk}${footer}