def complete_config(config: Config) -> Config:
"""
Complete configuration with complete paths and parameters.
Parameters
----------
config
Input configuration.
Returns
-------
The completed configuration.
"""
# Allow changing home path through environment variable (for testing)
home = Path(os.environ.get('MARKDOWNREVEAL_HOME', str(Path.home())))
config['local_path'] = home / config['local_path']
config['output_path'] = config['local_path'] / 'out'
config['reveal_extra']['theme'] = config['theme']
return config
评论列表
文章目录