<%inherit file="/base.boot.mako"/> <%namespace file="/extensions.mako" import="*"/> ##name Context ##tags home intro ##author John Doe Templates have access to a context that includes default variables and externally set variables. * the `f` variable that contains information on the current file. For example `f.name`, `f.fname`, `f.size` will produce `${f.name}`, `${f.fname}` and `${f.size}` (size in MB) * the `p` is the class underlying the entire PyBlue instance. It has many neat properties. For example the `p.files` class attribute contains information on all files processed by PyBlue. Thus say `len(p.files)` will produce `${len(p.files)}` `p.folder` will produce the path to the site folder `${p.folder}` Note that there are quite a few other attributes exposed via the `f` and `p` context variables. Each page may also contain any number of context values that will then be available to the page. For example this page has the following metadata associated with it. <%text filter="h"> ##name Context ##sortkey 2 ##tags home intro These three context variables will also have default values when not explicitly set as above. One can access them directly like so `f.name`, `f.sortkey`, `f.tags` to produce `${f.name}`, `${f.sortkey}` and `${f.tags}` * `name` will be displayed in the links and title * `sortkey` is the key by which table of contents are sorted * `tags` are space separated words that can be used to select groups of pages One may add any number of context variables for example <%text filter="h"> ##sample 123 ##author John Doe These will assigned as attributes to the file object that renders the page and could be accessed as say `f.author` that will produce: `${f.author}` Go back to ${link("index")}