drupal-scaffold composer append robots.txt

We recently upgraded to Drupal 9.3.0 with the composer layout. Each time we execute composer update the contents of robots.txt is overlayed with the file located in core/assets/scaffold/files/robots.txt. We would like to append the default robots.txt with project unique data.

I included the following in composer.json per the documentation I found:

    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            "file-mapping": {
               "[web-root]/robots.txt": {
               "append": "assets/robots.txt.append"

I hesitate to create the file core/assets/scaffold/files/robots.txt.append as we have been trained for sometime to not change/add any files in the core/ directory. Where should robots.txt.append be placed to make this work?

Go to Source of this post
Author Of this post: Greg Sims
Title Of post: drupal-scaffold composer append robots.txt
Author Link: {authorlink}