Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def mkdocs(config: dict):
"""Render the project's associated Markdown documentation using the specified
MkDocs config passed into the MkDocs `build` command.
This rendering is from `.md` Markdown documents into HTML
"""
config_instance = _mkdocs_config(config)
return mkdocs_build(config_instance)
log.info("Building documentation...")
config = load_config(
config_file=config_file,
dev_addr=dev_addr,
strict=strict,
theme=theme,
theme_dir=theme_dir,
site_dir=site_dir,
**kwargs
)
# Override a few config settings after validation
config['site_url'] = 'http://{}/'.format(config['dev_addr'])
live_server = livereload in ['dirty', 'livereload']
dirty = livereload == 'dirty'
build(config, live_server=live_server, dirty=dirty)
return config