Let's try SiteGenerator.
Perhaps, you have installed SiteGenerator. Now, download sample data from download page and generate HTML document from them. And compare XML documents with HTML documents to understand how to use SiteGenerator roughly. To try sample data, you must do next...
- $ tar zxvf sample_en_xml.tgz
- Set "url", "outputdir", "inputdir" in "site.xml". They must end with "/". To browse generated document in local machine, set "url" to "file://$outputdir/".
- $ cp sample_en_xml/sample_en.css $outputdir/
- In "sample_en_xml/teplate/siteGenerator_header.template", edit path to css file. This must "$url/sample.css".
- $ cp -r sample_en_xml/imported $outpudir/
- $ SiteGenerator.pl site.xml
SiteGenerator reads three types XML Documents.
- This is a XML document to describe the structure of your site. The document conforms "site.dtd". The document exists in top directory($SG_TOP) of source XML documents tree.
- They are XML documents to describe your diary. The documents conforms "diary.dtd". The file name of them are "index.html". They exists in "$SG_TOP/$DIARY/YYYY/MM/". The variable $DIARY defined in "site.xml".
- They are XML documents to describe your categorized item. The document conforms "article.dtd". The filename of them are ramdom. But the suffix of them must "xml", for example "hoge.xml". They exists in "$SG_TOP/$CATEGORY/$SUB_CATEGORY/". The variable $CATEGORY and $SUB_CATEGORY defined in "site.xml".