![]() |
Write previously extracted docs to disk.
tfdocs.generate_lib.write_docs(
*,
output_dir: Union[str, pathlib.Path],
parser_config: config.ParserConfig,
yaml_toc: Union[bool, Type[toc_lib.TocBuilder]],
root_module_name: str,
root_title: str = 'TensorFlow',
search_hints: bool = True,
site_path: str = 'api_docs/python',
gen_redirects: bool = True,
gen_report: bool = True,
extra_docs: Optional[dict[int, str]] = None,
page_builder_classes: Optional[docs_for_object.PageBuilderDict] = None
)
Write a docs page for each symbol included in the indices of parser_config to
a tree of docs at output_dir
.
Symbols with multiple aliases will have only one page written about them, which is referenced for all aliases.
Args | |
---|---|
output_dir
|
Directory to write documentation markdown files to. Will be created if it doesn't exist. |
parser_config
|
A config.ParserConfig object, containing all the necessary
indices.
|
yaml_toc
|
Set to True to generate a "_toc.yaml" file.
|
root_module_name
|
(str) the name of the root module (tf for tensorflow).
|
root_title
|
The title name for the root level index.md. |
search_hints
|
(bool) include meta-data search hints at the top of each output file. |
site_path
|
The output path relative to the site root. Used in the
_toc.yaml and _redirects.yaml files.
|
gen_redirects
|
Bool which decides whether to generate _redirects.yaml file or not. |
gen_report
|
If True, a report for the library is generated by linting the docstrings of its public API symbols. |
extra_docs
|
To add docs for a particular object instance set it's doc
attribute. For some classes (list, tuple, etc) doc is not writable.
Pass those docs like: extra_docs={id(obj): "docs"}
|
page_builder_classes
|
A optional dict of {ObjectType:Type[PageInfo]} for
overriding the default page builder classes.
|
Raises | |
---|---|
ValueError
|
if output_dir is not an absolute path
|