Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# Modify the naming process such that destination files get named properly for Jekyll _posts
def _nb2htmlfname(nb_path, dest=None):
fname = rename_for_jekyll(nb_path)
if dest is None: dest = Config().doc_path
return Path(dest)/fname
for original, new in warnings:
print(f'{original} has been renamed to {new} to be complaint with Jekyll naming conventions.\n')
# TODO: Open a GitHub Issue When there are any warnings
## apply monkey patch
export2html._nb2htmlfname = _nb2htmlfname
export2html.notebook2html(fname='_notebooks/*.ipynb', dest='_posts/')