def parse_frontmatter(raw_text: str) -> dict:
    """
    Parser for markdown file front matter. This parser has the following features:
       * Simple key-value pairings (`key: value`)
       * Comma-separated lists between brackets (`list: ['value1', 'value2']`)
       * Keys are case insensitive

    Args:
        raw_text (str): String containing frontmatter (excluding fences)

    Returns:
        dict: A dictionary containing all the frontmatter key:value pairs
    """
    front_matter = {}
    lines = raw_text.split("\n")
    for line in lines:
        if ":" in line:
            key, value = (item.strip() for item in line.split(": "))
            if value.startswith("[") and value.endswith("]"):
                value = [item.strip().strip("'\"") for item in value[1:-1].split(",")]
            front_matter[key.lower()] = value
        else:
            continue
    return front_matter