Stripping user profile links from noscript section of page source


I need to make some changes to our <noscript></noscript> section on various pages to prevent Google from being able to see that user forum links exist. eg. here in the topics/show.html.erb view.

I’m trying to figure out the best way to achieve this, but I imagine that I’ll need to override the entire view (of everything requiring this change) in a plugin. I’ve been trying this and other approaches (running Rails locally with NO_EMBER_CLI=1 bundle exec rails s and using the browser View Source feature) but I’m just not having any luck getting these templates overridden.

Perhaps someone here knows the trick to get this working? A magical one-liner, perhaps? :smiley: This example looks like it should do what I want, but unfortunately is out of date. Here is an adapted version:

# name: no_profiles_when_indexing
# about: Prevent indexing from even knowing that profile pages exist
# version: 0.1

after_initialize do
  ApplicationController.class_eval do
    def set_layout
      File.expand_path('../app/views/topics/show.html.erb', __FILE__)

I’m not actually a Ruby dev, so any hints or pointers would be much appreciated. Thanks.