def do_rename(argdict):
    '''Rename a page.'''
    site = make_site_obj(argdict)
    slug = argdict['slug']
    newtitle = argdict['newtitle']
    try:
        site.rename_page(slug, newtitle)
        print "Renamed page."
    except ValueError: # pragma: no cover
        print "Cannot rename. A page with the given slug does not exist."
        sys.exit()
Rename a page.