File utility functions for Sphinx.
Unknown Field: copyright | |
Copyright 2007-2022 by the Sphinx team, see AUTHORS. | |
Unknown Field: license | |
BSD, see LICENSE for details. |
Function | copy_asset |
Copy asset files to destination recursively. |
Function | copy_asset_file |
Copy an asset file to destination. |
Copy asset files to destination recursively.
On copying, it expands the template variables if context argument is given and the asset is a template file.
Parameters | |
source:str | The path to source file or directory |
destination:str | The path to destination directory |
excluded:PathMatcher | The matcher to determine the given path should be copied or not |
context:Dict | The template variables. If not given, template files are simply copied |
renderer:BaseRenderer | The template engine. If not given, SphinxRenderer is used by default |
onerror:Callable[ | The error handler. |
Copy an asset file to destination.
On copying, it expands the template variables if context argument is given and the asset is a template file.
Parameters | |
source:str | The path to source file |
destination:str | The path to destination file or directory |
context:Dict | The template variables. If not given, template files are simply copied |
renderer:BaseRenderer | The template engine. If not given, SphinxRenderer is used by default |