Website Navigation Generator ============================ :Author: Hermann Voßeler :Date: 2/2011 This page contains documentation and notes regarding the +menugen.py+ -- written 2/2011 during our attempt to get the new Lumiera website online finally. The link::https://git.lumiera.org/gitweb?p=website-staging;a=blob;f=menugen.lua;h=aad2129d7f4ed3f3b35b2fc3ac2a63a9f1bfb62d;hb=menugen[initial draft version] was written by _cehteh_ in Lua ************************************************************************** The purpose of the +*menugen*+ script is to maintain the navigation menu on the Lumiera website semi-automatically. In the usual setup, this script is triggered from a _Git push_ -- it walks the web subdirectories and discovers menu entries. The generated HTML page contains both visible elements and JavaScript snippets to display and highlight the menu on the client side appropriately ************************************************************************** Overview: how it works ---------------------- The menu generation and display is comprised of several parts working together . the +build_website.sh+ is triggered as a Git post-receive hook, whenever new commits are transfered to the website Git repository. After discovering new Asciidoc source files and generating the corresponding HTML files, the menu generator script is invoked . the +menugen+ python script walks the subdirectories to discover possible menu contents. It visits Asciidoc source files (`*.txt`) and picks up - the location / URL - the title - special `//MENU:` directives embedded in Asciidoc comments . after building a complete menu tree (actually a DAG), this data structure is walked to generate output HTML into a `menu.html` file in website root. . the page template (`page.conf`) for generated Asciidoc pages contains an +