def show(markdown_file: Path, host: str='localhost', port: int=8123):
"""
Visualize your presentation (default).
"""
markdown_file = Path(markdown_file)
observer = Observer()
handler = Handler(markdown_file)
# Initial generation
generate(markdown_file)
observer.schedule(handler, '.', recursive=True)
observer.start()
server = Server()
config = load_config()
server.watch(str(config['output_path'] / '.reload'), delay=0)
server.serve(
root=str(config['output_path']),
restart_delay=0,
debug=True,
open_url=True,
open_url_delay=0,
host=host,
port=port,
)
评论列表
文章目录