Skip to content

Rename base key on scan to make its purpose more clear

The base key on a scan defines the base path that is prepended to the path of all scanned files before those files are added to the aggregate. This feature provides a way to graft scanned files onto a location deeper in the hierarchy of a content root (e.g., modules/ROOT/examples). For example:

# current
scan:
  dir: build/apidocs
  files: '**/*.html'
  base: modules/ROOT/attachments

This base key makes sense if you understand the context behind how it was choosen. However, it can be easily misinterpreted as the base location of the scan (which is what the dir key already defines).

I propose renaming the base key to into. It's just as short and makes the purpose undoubtedly clear. Even at first glance, it's apparent that it refers to a step that follows the scan. "I want to import the scanned files into this directory path".

# proposed
scan:
  dir: build/apidocs
  files: '**/*.html'
  into: modules/ROOT/attachments

Another idea would be target:

# proposed
scan:
  dir: build/apidocs
  files: '**/*.html'
  target: modules/ROOT/attachments

We could also consider the names prepend or prefix. However, I'd like to favor implied meaning over accurate terminology.

Edited by Dan Allen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information