Estax Documentation
Jan 25 2009
Estax transforms a single XML file with a certain format into a number
of XHTML pages. The pages can contain a menu with links to other pages,
headers and footers, and a number of "boxes" that represent the content.
Each box can have a title and a date and a number of tags that serve two
purposes: They describe the content of that box, and they are used to
determine which boxes should form a page. Every box with tag XYZ will be
included on page XZY, which will be created by Estax as XYZ.xhtml (it is
encouraged to always write all tags in lower case though, to avoid problems
with broken links).Your content XML has the following structure:
<site> <header><!-- HTML --></header> <footer><!-- HTML --></header> <menu> <link tag="sometag"/> <link tag="category"> <menu> <link tag="subcategory"/> <!-- more links --> </menu> </link> <!-- more links --> </menu> <box> <tag tag="sometag"/> <!-- more tags --> <content> <!-- HTML --> </content> </box> <!-- more boxes --> </site>menu, header and footer are optional, as are the tags in boxes.
You write your page in this format, e.g. site.xml (the name is up to you, it just has to end with .xml), then type "make". Estax generates a directory "site" which contains the generated HTML.
Tag descriptions
XML-Tag | Description |
---|---|
site |
The outermost ("root") tag of the site. This has the following attributes:
|
header | Optional. Has no attributes. Fill this with HTML; it is displayed above the menu. |
footer | Optional. Has no attributes. Fill this with HTML; it is displayed below the boxes. |
menu | Optional. Has no attributes. Contains <link>s. |
link |
This has the following attributes:
|
box |
The box is used to represent a unit of content, or a section; boxes can not be nested though.
Each box has title and date, some content and an automatically generated tag list. It has
the following attributes:
|
tag |
This has the following attributes:
|
tagcloud | Has no attributes. Creates a cloud of tags that link to the respective pages. If you want a separate tags page, create a box with a content that contains only <tagcloud>. |
listing |
This has the following attributes:
|
space | Has no attributes. Generates a single nonbreakable space in the resulting HTML. Note that if you use a &bsp; directly, this will be not appear as an entity in the HTML but will be evaluated by Estax. |
Syntax Highlighting
To get nice syntax highlighting you have to do the following:
- Go to http://shjs.sourceforge.net/ and select a theme you like. Download sh_main.js, the theme css (from here) and the language definition files you like to use from here.
- Put the files (say, sh_main.js, sh_vim-dark.css and sh_scala.js) in the directory where your content XML is.
- In <site> set the codestyle attribute to "vim-dark", then write <listing language="scala"> ... <listing>.
Estax Stylesheets
The easiest way to generate a CSS for an Estax-generated page is to look at the page source. Basically, a <box> becomes a <div>, the <menu> becomes a <div> with the "menu" class and the <link>s within become a <ul>. You can look at the stylesheet of this page to see how it can be written.