Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add robots.txt setting. #5584

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Add robots.txt setting. #5584

wants to merge 5 commits into from

Conversation

robgietema
Copy link
Member

@robgietema robgietema commented Dec 29, 2023

Fixes #5580

Copy link

netlify bot commented Dec 29, 2023

Deploy Preview for plone-components canceled.

Name Link
🔨 Latest commit 7a30c65
🔍 Latest deploy log https://app.netlify.com/sites/plone-components/deploys/6790df75491f5f0008f19385

Copy link

netlify bot commented Dec 29, 2023

Deploy Preview for volto ready!

Name Link
🔨 Latest commit 442520b
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/6593d8ccc44d5b0008188cd6
😎 Deploy Preview https://deploy-preview-5584--volto.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@robgietema robgietema mentioned this pull request Dec 29, 2023
4 tasks
Copy link
Collaborator

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor grammar fix to the change note, otherwise I approve the docs change only. A core developer should review this as well.

packages/volto/news/5580.feature Outdated Show resolved Hide resolved
Copy link
Member

@sneridagh sneridagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but only make sure that the thing removed in the middleware is ok.

packages/volto/src/helpers/Robots/Robots.js Show resolved Hide resolved
packages/volto/src/helpers/Robots/Robots.js Show resolved Hide resolved
@sneridagh
Copy link
Member

@robgietema could you take a look at the suggestions and move this forward? Thanks!

* main: (741 commits)
  Improve the usability of the ObjectBrowser when inputting a manual value, checking it on blur, and adding a local validator (#6576)
  fixing Markdown heading (#6588)
  fix site logo issue (#6591)
  Route registry (#6600)
  Release @plone/client 1.0.0-alpha.21
  Export the getContent bare fetcher (#6594)
  fix: incorrect copied state useClipboard (#6585)
  [RR7] Update to latest RR7 and conventions, fix index page (#6589)
  Release 18.6.0
  Release @plone/slate 18.1.0
  Revert "added swedish translation" (#6578)
  Slate Italian translations (#6563)
  Release 18.5.0
  Fix robots.txt in devmode (#6571)
  added swedish translation (#6557)
  Depth search issue (#6558)
  Block examples documentation (#6560)
  Fixed folder contents issues with persistent selection (#6554)
  Fix redirects to MDN responsive images (#6552)
  Bugfix remove query string inclusion in body class generation logic (#6547)
  ...
@sneridagh
Copy link
Member

@robgietema @ericof @davisagli Let's resurect this, I've merged it with main and solved conflicts.

@sneridagh sneridagh added this to the 18.x.x milestone Jan 21, 2025
Copy link
Member

@ericof ericof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sneridagh @ericof For the most part this is just updating the implementation details, but I see one breaking change that needs to be resolved, and the changelog says it does something it doesn't.

const url = `${proto}://${host}${port}`;
text = text.replace(internalUrl, url);
// Replace the sitemap with the sitemap index.
text = text.replace('sitemap.xml.gz', 'sitemap-index.xml');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sneridagh @ericof Removing this replacement is a breaking change. We should keep it here, or handle it instead in plone/plone.volto#183

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, however I think it has to go to plone.volto too. Although that can be a breaking change, since it can mean an action needed in Google Search Consoles of people.

@@ -0,0 +1 @@
Expose robots.txt setting in Volto control panel, and render robots.txt based on REST API call. @robgietema
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is it exposed in the Volto control panel? I don't see it there. I expect it needs to be removed from

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, but related to the other comment:

image

The backend answer with the .gz, which we will override it afterwards in a shady way in code (btw, we are doing it right now)

@sneridagh sneridagh requested a review from davisagli January 22, 2025 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Work approved
Development

Successfully merging this pull request may close these issues.

Fix robots.txt feature
5 participants