- tutorial (2) (3)
(4) (5) (6) (7) (8) (9)
- usage (2)
- two passes
- still tiny
- tabbed (2)
- multi section
- printer style
- some hints
- all features #
- about me
- our sitemap
How to use MKSITE.SH
(a) xyz.htm body files (content) : To create a MKSITE website you should simply create a number of "*.htm" input pages with a normal html editor. No special requirements are needed. You do not even need to set a "<title>" tag, the first header tag found in the file is used alternativly for the long title of your page - e.g. this input file uses "<H3>", just compare the header line with the title bar of your web browser. It's just the lowercased variant of the section header.
(b) site.htm sitefile (navigation) : The "*.htm" files define the body of each "html" output page which is often presented in a central white (inline)frame. To define the navigation items you only need to create a single extra "sitefile" by convention named "site.htm". This sitefile is the only argument to the MKSITE.SH script - the mksite.sh script will scan it for href's which will define the list of files that it needs to process. Effectivly you may have more files in the source directory that are not touched at all, only the href'ed ones are "generated".
(c) href="xyz.html" in sitefile (binding) : In fact not all the "href"s in the sitefile are going to be processed (as some might be generated by other tools of course). Only those with a special href format are converted which is simply that they start after a simple markup that starts itself right at the beginning of line - in other words a section marker followed by the html href anchor - example:
<title>common title prefix <!--$title?--></title> <hr><a href="index.html">Overview</a> <br>-<a href="intro.html">Introduction</a> <br>-<a href="where.html">Downloads</a> <hr><a href="doc.html">Documentation</a> <br>-<a href="man.html">Manual Page</a> <br>-<a href="ref.html">Cross References</a> <br><a href="impressum.html">Impressum</a> <hr>
where the last entry is not seen by mksite.sh since it does think it to be normal paragraph text. That allows you to build an "impressum.html" elsewhere, possibly a copy of a file generated by your supervising agency (or something like that).
(d) mksite.sh site.htm (generate): In fact the example above is a valid sitefile, even that the look is not eactly all too pleasing. Better use one of our cut-n-paste examples. Still note how we did use the hr-direct tags and br[-]-tags to define the categories of our website. Any additional space at the start of the line will make mksite.sh to ignore any hrefs contained on that line. All others are checked to be part of a known "sect"-classification style.
With a file like "site.htm" available, just run
sed -f xyz.html~head~ site.htm >xyz.html sed -f xyz.html~body~ xyz.htm >>xyz.htmlwhere ~head~ is generated from site.htm and ~body~ from xyz.htm.