class Theme(object)
A theme contains templates for use with the JinjaRDF site builder.
Attributes:
package
str - the full dotted path of the theme’s package, e.g. ‘foo.bar.basetheme’name
str - A human-readable name of the theme. Default is the theme’s subpackage,
e.g. ‘basetheme’.template_path
str - The template path relative to the theme’s package.
Defaults to ‘templates’.def __init__(package: str, name: str = None, template_path: str = 'templates')
Initialize the theme
Arguments:
package
str - the full dotted path of the theme’s package, e.g. ‘foo.bar.basetheme’name
str - Optional human-readable theme name. If None, then theme.name
will be the name of the theme’s subpackage (e.g. ‘basetheme’).
Defaults to None.template_path
str, optional - The template path relative to the theme’s package.
Defaults to ‘templates’.def copy_templates(target_folder: str) -> list
Copy the theme’s templates to a subfolder in the site generator’s template folder.
Arguments:
target_folder
str - the site generator’s template folderReturns:
list
- the names of the copied templates