Learning and using aap in website project

Fredrik <aap-rLZlch/[email protected]> Mon, 28 Jun 2004 23:08:56 +0200
Newsgroups gmane.comp.tools.aap.user
Message-ID <[email protected]>
Hi,

I'm maintaining a website for an non-profit org and all the articles that get
submitted is written in asciidoc[1] and I have been using simple shell scripts
for generating and uploading the site and has worked pretty okay until I
stumbled on a-a-p via asciidoc's homepage and found an example how to build
and maintain a site with asciidoc and aap, beautiful!

Here is how my tree looks like:
    
    /
    /style
    /html
    /source/
    /source/conf
    /source/articles
    /source/articles/conf

Where:
    style - is where some images and css files are located
    html - where the generated site should be placed
    source - where the site is index.asc, contact.asc and so on
    source/articles - where the submitted articles are located
    conf - is the asciidoc configuration for templating.

I would like to generate html from ascidoc sources and from the asciidoc
website example[2] the "rule" looks like this:

---------- cut
ROOT =
    index
    aboutsite
    about
    tutorials

ASCIIDOC_FILES = $*(ROOT).asc
HTML_FILES = $*(ROOT).html

# AsciiDoc options to generate web pages.
ASCIIDOC_OPTS = -b css -f conf/asciidoc.conf -g revision=$VERS

# File translation rules.
:rule %.html : %.asc conf/asciidoc.conf
    @if target == 'index.html':
        # Index has description and keywords meta tags.
        ASCIIDOC_OPTS += -g index-only -o $target
    :sys $ASCIIDOC $ASCIIDOC_OPTS -o $target $(source[0])

all: build

build: $HTML_FILES
----------- cut

This works very well when you have the main.aap *.asc files in the same
directory. So my question is how I should do when using subdirs for generating
the site? 

I have checked the documentation and tried but with no luck. I couldn't find
any good examples either so I thought I would try my luck here.


[1] : http://www.methods.co.nz/asciidoc/index.html
[2] : http://www.methods.co.nz/asciidoc/examples/website/index.html

-- 
.Fredrik





-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com