Just about every module I’ve worked on has a DemoInitializer class to import test content. This makes it easy for multiple people to work on the same module because we can create and share one site with demo content. But the import folder name is hardcoded into the class, so it has to be edited every time it’s used in a new module. It just doesn’t feel right to have something hardcoded like that. I can imagine a few other scenarios where it might be a good idea to have a config file outside of the module jar. I propose that we come up with a way to make a config file and put it in the $XP_HOME/deploy directory along with the module jar file.
Notice in the file below, line 66 has “/intranet” hardcoded
final ContentPath demoSitePath = ContentPath.from( "/intranet" );