code: func optionalSiteRoot(siteRoot string) (string, error) {
  	if siteRoot == "" {
  		cwd, err := os.Getwd()
  		if err != nil {
  			return "", err
  		}
  		siteRoot = findSiteRoot(cwd)
  		if siteRoot == "" {
  			return "", fmt.Errorf("directory %s is not in a site root, use 'init' to create one", cwd)
  		}
  		return siteRoot, nil
  	}
  	siteRoot, err := filepath.Abs(siteRoot)
  	if err != nil {
  		return "", err
  	}
  	if !isSiteRoot(siteRoot) {
  		return "", fmt.Errorf("directory %s doesn't look like a site root, use 'init' to create one", siteRoot)
  	}
  	return siteRoot, nil
  }
docs: // optionalSiteRoot takes a path to a site root or an empty string. If some
  // path is given, it normalizes it and ensures that it is indeed a site root
  // directory. If empty string is given, it discovers a site root for current
  // directory.