Simple With Navigation
This theme demonstates adding a Markdown file for controlling site
navigation and document specific titles. Like the simple theme you have
a Content element and a sitewide common CSSPath element.
The title element in the Markdown document is extracted with the mkpage
utility called titleline.
This theme relies on three mkpage project commands - mkpage,
reldocpath, titleline` and ws (for testing the website and viewing
from your web browser over http://localhost:8000)
To test this theme do the following run the following commands in this
directory.
./mk-website.bash
ws
Point your webbrowser at http://localhost:8000 and view this page.
Improvements over one-element
- The Title is generated from extracting it from the Markdown document being processed.
- Navigation is defined in nav.md for the site. This is generated by collection document URLs and relative paths using standard Unix shell commands
- CSSPath is calculated, as before, with reldocpath
- mk-website.bash will find all Markdown files and subdirectories and render nav.md automatically
Limitations
- This theme assumes this directory is the root HTML directory
- nav.md is treated as a special filename and not rendered as its own page
- Navigation is defined as a UL list and always expanded but this could be improved with updating the CSS pointed to by CSSPath