def merge_single_site(global_nav, site_name, site_nav, unify_sites):
    """
    Merges a single site's nav to the global nav's data. Supports unification
    of sub-sites with the same site_name.
    """
    unified = False
    if unify_sites:
        for page in global_nav:
            if site_name in page:
                page[site_name] = page[site_name] + site_nav
                unified = True
                break
    if not unify_sites or not unified:
        global_nav.append({site_name: site_nav})
