Add Page to Navigation
Description
Adds page to website navbar left. Will be added to the _quarto.yml file if not yet included. Will place the source file (qmd) in the quarto output folder under name dest and linked in the navigation as text.
Usage
DocConverter.add_navbar_page(src, dest, text,
menu=None)
Arguments
-
srcstr -
Path to an existing quarto file, must end in
.qmd. -
deststr -
Name or path for target quarto file. If path, the directory will be created inside
quarto_diras specified in the config (see DocConverter) if not yet existing. -
textstr - Name used in the navigation.
-
menuNone, str -
Must be
Noneif pages are added. If set, it is expected that a menu with this name exists. The page will then be added to that menu if not already in there.
Raises
-
TypeError: Ifsrc,dest,textare not str. -
ValueError: Ifsrcanddestdo not end in.qmd -
ValueError: Ifdestis a path, not only the name of the target quarto file. -
FileNotFoundError: Ifsrcdoes not exist. -
TypeError: Ifmenuis notNonenorstr. -
Exception: Ifdestalready exists but overwrite is setFalse(see DocConverter). -
Exception: ifsrccannot be copied to destination.