code: function versionTransform (file, options) {
    const rootSelection = quantum.select(file.content)
  
    // Is it a versioned file? Early return if not
    if (!rootSelection.has('versionedPage', {recursive: true})) {
      return [file]
    }
  
    // Resolve the complete version list
    const versions = rootSelection.select('versionedPage', {recursive: true})
      .selectAll('version')
      .map(s => s.ps())
  
    // Resolve the list of versions to build
    const targetVersions = options.versions || versions
  
    // Clone the file for each targetVersion, and do the version processing for each cloned file
    const outputFiles = targetVersions.map(version => {
      const clonedFile = file.clone({
        info: options.filenameModifier(file.info, version),
        content: quantum.clone(file.content),
        meta: {
          version: version
        }
      })
      return processFile(clonedFile, version, versions, targetVersions)
    })
  
    // Optionally output the latest version without the filename modification
    if (options.outputLatest) {
      const lastVersionedFile = outputFiles[outputFiles.length - 1]
      outputFiles.push(file.clone({
        content: quantum.clone(lastVersionedFile.content),
        meta: {
          version: lastVersionedFile.meta.version
        }
      }))
    }
  
    return outputFiles
  }
docs: /* Resolves a file with @versioned content into multiple files