code: func (l PermalinkExpander) pageToPermalinkSlugElseTitle(p Page, a string) (string, error) {
  	if p.Slug() != "" {
  		return l.ps.URLize(p.Slug()), nil
  	}
  	return l.pageToPermalinkTitle(p, a)
  }
docs: // if the page has a slug, return the slug, else return the title