Module luadoc.doclet.html
Doclet that generates HTML output. This doclet generates a set of html files based on a group of templates. The main templates are:
- index.lp: index of modules and files;
- file.lp: documentation for a lua file;
- module.lp: documentation for a lua module;
- function.lp: documentation for a lua function. This is a sub-template used by the others.
Functions
| search (path, name) | Looks for a file `name' in given path. |
| include (template, env) | Include the result of a lp template into the current stream. |
| link (html, from) | /" to the link to make it right. |
| module_link (modulename, doc, from) | Returns the name of the html file to be generated from a module. |
| file_link (to, from) | Returns the name of the html file to be generated from a lua(doc) file. |
| function_link (fname, doc, module_doc, file_doc, from) | Returns a link to a function |
| symbol_link (symbol, doc, module_doc, file_doc, from) | Make a link to a file, module or function |
| out_file (filename) | Assembly the output filename for an input file. |
| out_module (modulename) | Assembly the output filename for a module. |
| start (doc) | Generate the output. |
Functions
- search (path, name)
-
Looks for a file `name' in given path. Removed from compat-5.1
Parameters
- path:
- name:
- include (template, env)
-
Include the result of a lp template into the current stream.
Parameters
- template:
- env:
- link (html, from)
-
Returns a link to a html file, appending "../" to the link to make it right.
Parameters
- html: Name of the html file to link to
- from:
Return value:
link to the html file - module_link (modulename, doc, from)
-
Returns the name of the html file to be generated from a module. Files with "lua" or "luadoc" extensions are replaced by "html" extension.
Parameters
- modulename: Name of the module to be processed, may be a .lua file or a .luadoc file.
- doc:
- from:
Return value:
name of the generated html file for the module - file_link (to, from)
-
Returns the name of the html file to be generated from a lua(doc) file. Files with "lua" or "luadoc" extensions are replaced by "html" extension.
Parameters
- to: Name of the file to be processed, may be a .lua file or a .luadoc file.
- from: path of where am I, based on this we append ..'s to the beginning of path
Return value:
name of the generated html file - function_link (fname, doc, module_doc, file_doc, from)
-
Returns a link to a function
Parameters
- fname: name of the function to link to.
- doc: documentation table
- module_doc:
- file_doc:
- from:
- symbol_link (symbol, doc, module_doc, file_doc, from)
-
Make a link to a file, module or function
Parameters
- symbol:
- doc:
- module_doc:
- file_doc:
- from:
- out_file (filename)
-
Assembly the output filename for an input file. TODO: change the name of this function
Parameters
- filename:
- out_module (modulename)
-
Assembly the output filename for a module. TODO: change the name of this function
Parameters
- modulename:
- start (doc)
-
Generate the output.
Parameters
- doc: Table with the structured documentation.