In many Optimizely CMS projects, certain files must exist at the root of the site - robots.txt, ads.txt, security.txt, or other plain text endpoints required by search engines, security standards, or integrations.
These files are often managed outside the CMS and require deployments for even small changes. That workflow is inconvenient for editors and adds unnecessary friction for operations.
To address this, I developed a small open-source plugin called Virtual Text, which allows managing and rendering root-level text files directly from the Optimizely back office.
Repository:
https://github.com/ddprince17/davidhome-optimizely-virtualtext
Virtual Text extends Optimizely CMS with the ability to define and serve text files directly from the application pipeline rather than from physical files on disk.
Editors can manage files such as:
All content is editable through the CMS interface and served dynamically by middleware.
The plugin was built with real Optimizely environments in mind, including multi-site setups.
Virtual Text supports:
This allows different sites or hostnames within the same CMS instance to expose different text files or content when required.
The plugin separates file locations from file contents and supports Azure-backed storage providers.
Available packages include:
Core:
This approach allows scaling storage independently and avoids coupling text files to local disk.
The repository also includes an optional RobotsTxt extension designed to solve a common operational problem - preventing indexing of test and staging environments.
Features include:
This reduces the risk of staging or QA environments being indexed accidentally, which is still a surprisingly common issue in enterprise projects.
Virtual Text integrates with Optimizely permissions to control access:
This allows delegating responsibility safely to operations or marketing teams without exposing broader CMS administration rights.
In multiple projects, I repeatedly encountered the same friction:
Virtual Text was built to solve these problems in a reusable and consistent way.
Installation is straightforward:
Full instructions and examples are available in the repository:
https://github.com/ddprince17/davidhome-optimizely-virtualtext
Feedback, issues, and contributions are always welcome!