def save_frontmatter(data: dict) -> str:
    """
    Saves the given dictionary as markdown frontmatter.

    Args:
        data (dict): Dictionary containing all the frontmatter key-value pairs

    Returns:
        str: A string containing the frontmatter in the correct plaintext format 
    """
    lines = []
    for key, value in data.items():
        if isinstance(value, list):
            lines.append(str(key) + ": " + "[" + ",".join([f"'{x}'" for x in value]) + "]")
        else:
            lines.append(str(key) + ": " +  str(value))
    return "\n".join(lines)