.--------------------------------------------------------------------- .- prelude.def htmlpp documentation definitions .- .- I like to use a single file to collect all definitions such as .- links to external pages, headers, footers, etc. .--------------------------------------------------------------------- .- The complete $(SERVER) tree is mirrored at $(LOCAL) .define SERVER "" .define LOCAL %(SITE) .define imatix http://www.imatix.com/ .define info mailto:info@imatix.com .define version %(vgsln) .block header .block header $(TITLE)
 
| iMatix home page
| $(*FIRST_PAGE=<<) | $(*PREV_PAGE=<) | $(*NEXT_PAGE=>) | $(*LAST_PAGE=>>)
GSLgen

.end .block footer
| $(*FIRST_PAGE=<<) | $(*PREV_PAGE=<) | $(*NEXT_PAGE=>) | $(*LAST_PAGE=>>)
.build index
iMatix
Copyright © 1996-2000 iMatix
.endblock .- Browsers do not generally like an empty anchor. We do not want .- to show anything, since anchors often come just before headers. .- One possibility is a non-breaking space, which is what we use. .- .block anchor   .endblock .block index_open .block index_entry .if "$(INDEX_PAGE)" eq "$(PAGE)" | $(INDEX_TITLE) .else | $(*INDEX_PAGE="$(INDEX_TITLE)") .endif .endblock .block dir_open
.block dir_entry
$(*DIR_HREF="$(DIR_NAME)") $(DIR_SIZE) $(DIR_DATE) $(DIR_TIME)  $($(DIR_EXT))
.block dir_close
.endblock .- In the directory entry block (above), we translate each extension into .- a descriptive text using $($(DIR_EXT)). For instance, ".txt" -> "Text". .- The filetype.def file lists various such extensions. Add your own to .- cover the types of file you provide. If you fail to define some file .- extension, htmlpp will give you an error message like '.txt undefined'. .include filetype.def