mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
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:
parent
023f03af15
commit
547e174aa4
3 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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 == '/'
|
||||
|
|
|
@ -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">
|
||||
|
|
Loading…
Add table
Reference in a new issue