CommentFileSizeAuthor
#10 3143841.patch677 bytestyler36

Issue fork robotstxt-3143841

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

VVS created an issue. See original summary.

tbsiqueira’s picture

When using Drupal Scaffold you need to add the following to your composer.json file:

Under the "extra" sections:

        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            },
            "file-mapping": {
                "[web-root]/robots.txt": false
            }
        }

This will make composer ignore the robots.txt file

EDIT: Tip from Elisabeth Escribano

bradallenfisher’s picture

sweet tip!

ccjjmartin’s picture

Version: 8.x-1.4 » 8.x-1.x-dev
Issue tags: +Novice, +good-first-issue

This is a great idea, I see two approaches:

1) We could take the easy route and update the README.md to include this as part of the installation section. Maybe add a "composer setup" subsection?

2) We could take the harder route and update the composer.json file to include this but then additionally we still have to update the documentation (README.md) to include changing the project specific composer.json to allow this module to overwrite its scaffolding settings.

So at a minimum this is an easy contribution for updating the README.md file. I am going to add the novice contributor tag.

The harder route here might not make sense because people still have to update their project repo. If anyone wants to see an example of allowing scaffolding in composer dependencies, I implemented it in this project: https://github.com/fourkitchens/sous-drupal-project/blob/2.x/composer.js... which pulls in the scaffolding settings from the distro: https://github.com/fourkitchens/sous-drupal-distro/blob/2.x/composer.jso...

pragati_kanade made their first commit to this issue’s fork.

pragati_kanade’s picture

Assigned: Unassigned » pragati_kanade

pragati_kanade’s picture

Assigned: pragati_kanade » Unassigned
Status: Active » Needs review
ajv009’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me

tyler36’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new677 bytes

I created a patch that expands a little more.

I don't think we need include a reference to "locations" because this will be different between projects ( Eg. "composer install" vs Acquia DevDesktop2 ). Both of these projects already create the "locations" section by default.

ilgnerfagundes’s picture

Status: Needs review » Reviewed & tested by the community

I did a reading of the patch and everything is fine, it can be done the commit.

aiphes’s picture

I just switch from composer 1 to 2 and adding the use of scaffolding. So when I delete the robots.txt file the site goes down, run

composer2 update : Scaffolding files for drupal/core:
  - Copy [web-root]/robots.txt from assets/scaffold/files/robots.txt

get back the website.
So do I need to apply the tips from #2 or just do an update of the module ? actually using the 1.4

name     : drupal/robotstxt
descrip. : Generates the robots.txt file dynamically and gives you the chance to edit it, on a per-site basis, from the web UI.
keywords :
versions : * 1.4.0

thanks for help

ccjjmartin’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Quickfix Need Reroll

The latest patch does not apply. The wording on the latest patch looks good to me, just needs to be able to be applied.

rpayanm made their first commit to this issue’s fork.

rpayanm’s picture

Status: Needs work » Needs review
rossb89’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
rossb89’s picture

Issue summary: View changes

The MR in #14 looks fine against 8.x-1.x but won't apply against 1.4 release (current latest release) as the README in that release is a .txt extension but in this commit here: https://git.drupalcode.org/project/robotstxt/-/commit/68297f33f472d5a210... it was changed to a markdown .MD file.

So marking as reviewed and tested as it's fine against the current 8.x-1.x branch.

orkutmuratyilmaz’s picture

Issue tags: -

Any chance for merge?

ccjjmartin’s picture

ccjjmartin’s picture

Thanks for the reminder to merge. Everyone on the thread got credit including the original mention of the user who suggested the tip originally. Thanks all.

ccjjmartin’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.