code: def rename(self, new_title):
          
          if not isinstance(new_title, str) and \
                  not isinstance(new_title, unicode):
              raise TypeError
              # print "Cannot rename page. New title must be string or unicode."
  
          new_slug = util.make_slug(new_title)
          if self.site.page_exists_on_disk(new_slug):
              raise ValueError
              # print "Cannot rename page. A page with the same \
              # title/slug already exists."
  
          #wipe the source directory for this page
          shutil.rmtree(self._dirs['source_dir'])
  
          #just change dirinfo, config, and write
          self._title = new_title
          self._slug = new_slug
          self._config['title'] = [self._title]
          self._config['slug'] = [self._slug]
  
          self._dirs['source_dir'] = os.path.join(self.site.dirs['source'],
                                                  new_slug)
          self._dirs['source_filename'] = os.path.join(self._dirs['source_dir'],
                                                       new_slug + '.md')
  
          self._dirs['www_dir'] = os.path.join(self.site.dirs['www'], new_slug)
          #self._dirs['www_filename'] = os.path.join(self._dirs['www_dir'], \
          #                                       new_slug + '.html')
          self.write()
docs: Rename an existing s2 page.
  
          For an existing s2 page, updates the directory and file name,
          as well as the internal configuration information (since it
          contains the title and the slug)