Add meta robots noindex to search and profile #10120
Add meta robots noindex to search and profile #10120andreslucena merged 8 commits intodecidim:developfrom
Conversation
|
I'm hoping from your parenthesis around |
At the moment no profile is being indexed, hence the draft state. |
|
Hi all! FYI I was reviewing old PRs and found this one. In mentioned to @decidim/product and we agreed that we wanted this change, with a couple of caveats:
|
6e93f73 to
f961de3
Compare
5c6b484 to
256fef3
Compare
256fef3 to
57d98cc
Compare
andreslucena
left a comment
There was a problem hiding this comment.
Wow, really clean comparing to the first approach, congratulations!
Can you add a spec for these changes? I was thinking in something like this:
diff --git a/decidim-core/spec/system/user_profile_spec.rb b/decidim-core/spec/system/user_profile_spec.rb
index 9d0b85a9e8..d0e57b9afa 100644
--- a/decidim-core/spec/system/user_profile_spec.rb
+++ b/decidim-core/spec/system/user_profile_spec.rb
@@ -40,6 +40,10 @@ describe "Profile", type: :system do
visit decidim.profile_path(user.nickname)
end
+ it "is not indexable by crawlers" do
+ expect(page.find('meta[name="robots"]', visible: false)[:content]).to eq("noindex")
+ end
+
it "shows user name in the header, its nickname and a contact link" do
expect(page).to have_selector("h1", text: user.name)
expect(page).to have_content(user.nickname)Of course we should move it to a shared example so its reusable in the different pages, but this can be a starting point 😄
andreslucena
left a comment
There was a problem hiding this comment.
It seems like you didn't push or applied my suggestions. Maybe it's better to accept the changes through the GitHub UI, so it's automatically marked as solved?
|
Also, the specs that I mentioned aren't here. Maybe you forgot to push? |
The changes are visible in this PR now. |
andreslucena
left a comment
There was a problem hiding this comment.
There's a failing spec, can you check it out 🙏🏽 ?
Missing translation. Will be addressed today. |
andreslucena
left a comment
There was a problem hiding this comment.
Two little changes and this is ready 😄
Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
* feature/renaming-redesign: Use default current participatory space scope as root on scopes_select_tag called from bulk actions restore the imports thing (compilation fails for initiatives) change testing color: dequelabs/axe-core#3513 (comment) Fix admin redesign module (#11648) Apply flash styles to Announcements (#11708) Refactor oneliners of redesigned_a11y.js (#11713) Redesign: fix votings admin module issues (#11704) Add meta robots noindex to search and profile (#10120) Refactor dropdown scroll to menu (#11710) Remove unused partial Remove REDESIGN_PENDING obsolete comand Redesign: fix assembly members sidebar menu (#11699) Redesign: fix conferences admin module issues (#11703) Redesign: fix assemblies admin module issues (#11702)
* Add meta tag no-index * Apply review recommendations * Add missing key * Ignoring key * More i18n keys * Moving unusued keys * Apply suggestions from code review Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com> --------- Co-authored-by: Andrés Pereira de Lucena <andreslucena@users.noreply.github.com>
🎩 What? Why?
In this PR we are adding a
<meta name="robots" content="noindex">tag to avoid, user profiles being indexed by the search engines.This is a basic implementation of Dereference (new) profile pages to limit spam exposure and disincentivise spam accounts
📌 Related Issues
Link your PR to an issue
Testing
<meta name="robots" content="noindex">in the source<meta name="robots" content="noindex">in the source📷 Screenshots
Please add screenshots of the changes you're proposing
