This is my script for modifying/inserting yaml header in quarto documents.
- Insert custom yaml header in quarto documents(.ipynb, .qmd)
- Copy the quarto
_extensions
and CSSstyle
folder to the target document directory - Detect whether there is origninal header in documents and prompt to replace.
- Support for multiple quarto documents in one folder
- Auto update the quarto extensions when copying
-
Clone this repo
git clone https://github.com/kanghengliu/initheader.git
-
browse quarto extensions u want to use, then copy to
_extensions
folder -
put your favourite css/scss file into
style
folder -
Edit yaml header to your liking in
init_header.py
NOTE: There are two header chunks that needs editing! One for ipynb and one for qmd! -
in terminal, run
/Path/to/init_header.py "TITLE" "SUBTITLE" 1[0,False,True] /Path/to/doc[/Path/to/folder]
-
For help, run
/Path/to/init_header.py -h
-
(Optional) Add script to .zshrc alias(MacOS/Linux) for quicker access