import yaml


def build_content(csvdict):
    """ 
    Construct a new dictionary that will be used to populate the template.
    """
    yamlkeys = ['title', 'excerpt', 'tags', 'mentors', 'badge', 'level']
    #yamlkeys = ['title', 'excerpt', 'tags']
    yamldict = {}
    content = csvdict.copy()

    #sidekeys = ['mentors', 'badge', 'level']

    for k in yamlkeys:
        yamldict[k] = csvdict[k]
        del content[k]
    yml = yaml.dump(yamldict)
    content['yaml'] = yml
    return content