def dict2yaml(yaml_dict: dict) -> str:
    """
    Convert the YAML dict into the YAML front matter string.

    Parameters
    ----------
    yaml_dict : dict
        Dict made from the YAML front matter.

    Returns
    -------
    str
        YAML front matter into string.
    """
    yaml_text = "---\n"
    for i in yaml_dict:
        line = f"{i}: {yaml_dict[i]}"
        yaml_text += f"{line.strip()}\n"
    yaml_text += "---\n"
    return yaml_text