Directives¶
This page documents the custom directives provided by awdur.
- .. code::¶
awdurextends the default code block directives, introducing options allowing you to specify where each block of code sits within the project structure.example.pyprint("Hello, world!")
In addition to the usual options,
awdurintroduces the following options.- filename¶
Specify the output file this code block belongs within. When the same filename is used across multiple code blocks, their contents will be concatenated in the order that they are encountered.
- template¶
Specify the template used to render the final file. Only needs to be used on one code block within a file.
- project¶
Specify the name of the project to associate the code block with. If not given the default name
defaultwill be used.
- .. awdur:template::¶
Define a custom template to use with a project. See Inline Templates for example usage.
- project¶
Specify the name of the project to associate the template with. If not given the default name
defaultwill be used.
- .. awdur:project-tree::¶
Note
This directive only has an effect with html outputs.
Insert an interactive file explorer for code files produced by the given project. If no name is given, the default name
defaultwill be used.See Project Tree and Multiple Projects for example usage.