migrate_nb_fm
migrate_nb_fm (path, overwrite=True)
Migrate fastpages front matter in notebooks to a raw cell.
migrate_nb_fm (path, overwrite=True)
Migrate fastpages front matter in notebooks to a raw cell.
---
title: "fastcore: An Underrated Python Library"
description: A unique python library that extends the python programming language and provides utilities that enhance productivity.
author: "<a href='https://twitter.com/HamelHusain'>Hamel Husain</a>"
image: images/copied_from_nb/fastcore_imgs/td.png
categories: [fastcore, fastai]
aliases: [/fastcore/]
---
migrate_md_fm (path, overwrite=True)
Make fastpages front matter in markdown files quarto compliant.
Here is what the front matter of a markdown post looks like before:
---
toc: true
layout: post
description: A minimal example of using markdown with fastpages.
categories: [markdown]
title: An Example Markdown Post
---
# Example Markdown Post
## Basic setup
Jekyll requires blog post files to be named according to the following format:
And this is what it looks like after:
_res = migrate_md_fm('../tests/2020-01-14-test-markdown-post.md', overwrite=False)
print(_res[:300])
---
title: An Example Markdown Post
description: A minimal example of using markdown with fastpages.
categories: [markdown]
aliases: [/markdown/2020/01/14/test-markdown-post]
---
# Example Markdown Post
## Basic setup
Jekyll requires blog post files to be named according to the following format:
nbprocess_migrate_directives (fname:str=None, disp:bool=False, stdin:bool=False, no_skip:bool=False)
Convert all directives in fname
from v1 to v2.
Type | Default | Details | |
---|---|---|---|
fname | str | None | A notebook name or glob to convert |
disp | bool | False | Print the outputs with newly formatted directives |
stdin | bool | False | Read input stream and not nb folder |
no_skip | bool | False | Do not skip directories beginning with an underscore |