Add NOINDEX, FOLLOW to site profiles

Search engines are ranking profiles above the actual site, so we're
going to tell search engines not to index them.
This commit is contained in:
Kyle Drake 2017-06-14 12:25:11 -07:00
parent 023f03af15
commit 547e174aa4
3 changed files with 15 additions and 0 deletions

View file

@ -30,6 +30,8 @@ get '/site/:username/?' do |username|
@pagination_dataset = events_dataset
@latest_events = events_dataset.all
meta_robots 'noindex, follow'
erb :'site', locals: {site: site, is_current_site: site == current_site}
end

View file

@ -58,6 +58,15 @@ def enforce_ban
redirect '/'
end
def meta_robots(newtag=nil)
if newtag
@_meta_robots = newtag
end
@_meta_robots
tag = newtag || @_meta_robots
end
def title
out = "Neocities"
return out if request.path == '/'

View file

@ -15,6 +15,10 @@
<meta property="og:url" content="https://www.neocities.org">
<meta property="og:description" content="Neocities is the new Geocities. Create your own free home page, and do whatever you want with it.">
<% if meta_robots %>
<meta name="robots" content="<%= meta_robots %>">
<% end %>
<link href="/css/neo.css" rel="stylesheet" type="text/css" media="all">
<link href="/favicon.ico?v=4" rel="shortcut icon" type="image/ico">