processing
css_styles(file:dict, rootDir:str, optional)
Generate relative tags for all CSS files under a styles directory. This is used to inject CSS references into each HTML file based on its location.
Parameters:
file
(dict): A dictionary representing the current file, containing 'html_path'.rootDir
(str, optional): Root directory containing the 'styles' folder. Defaults to 'docs'.
Returns:
str
: A string containing HTML elements with relative paths to CSS files.Examples:
>>> css = css_styles({'html_path': 'docs/module/file.html'})
>>> print(css)
Labels:
src_PyThon_Docy_processing_css_styles