Merge pull request #1498 from consul/seo

SEO
This commit is contained in:
Juanjo Bazán
2017-04-24 11:38:56 +02:00
committed by GitHub
6 changed files with 47 additions and 30 deletions

View File

@@ -587,12 +587,8 @@ footer {
padding-left: 0; padding-left: 0;
} }
h2 a { a.title {
border-bottom: 1px solid $text-light; font-weight: bold;
display: block;
font-size: rem-calc(24);
line-height: rem-calc(31);
padding-bottom: $line-height/4;
text-decoration: none; text-decoration: none;
} }
} }

View File

@@ -1,6 +1,6 @@
<% if user_signed_in? %> <% if user_signed_in? %>
<li> <li>
<%= link_to notifications_path, class: "notifications" do %> <%= link_to notifications_path, rel: "nofollow", class: "notifications" do %>
<span class="sr-only"><%= t("layouts.header.notifications") %></span> <span class="sr-only"><%= t("layouts.header.notifications") %></span>
<% if current_user.notifications_count > 0 %> <% if current_user.notifications_count > 0 %>
<span class="icon-circle" aria-hidden="true"></span> <span class="icon-circle" aria-hidden="true"></span>
@@ -12,19 +12,24 @@
<% end %> <% end %>
</li> </li>
<li> <li>
<%= link_to t("layouts.header.my_activity_link"), user_path(current_user) %> <%= link_to t("layouts.header.my_activity_link"),
user_path(current_user), rel: "nofollow" %>
</li> </li>
<li> <li>
<%= link_to t("layouts.header.my_account_link"), account_path %> <%= link_to t("layouts.header.my_account_link"),
account_path, rel: "nofollow" %>
</li> </li>
<li> <li>
<%= link_to t("devise_views.menu.login_items.logout"), destroy_user_session_path, method: :delete %> <%= link_to t("devise_views.menu.login_items.logout"),
destroy_user_session_path, rel: "nofollow", method: :delete %>
</li> </li>
<% else %> <% else %>
<li> <li>
<%= link_to t("devise_views.menu.login_items.login"), new_user_session_path %> <%= link_to t("devise_views.menu.login_items.login"),
new_user_session_path, rel: "nofollow" %>
</li> </li>
<li> <li>
<%= link_to t("devise_views.menu.login_items.signup"), new_user_registration_path, class: "button" %> <%= link_to t("devise_views.menu.login_items.signup"),
new_user_registration_path, rel: "nofollow", class: "button" %>
</li> </li>
<% end %> <% end %>

View File

@@ -11,29 +11,23 @@
consul: link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), target: "blank")).html_safe consul: link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), target: "blank")).html_safe
%> %>
<%= t("layouts.footer.contact_us") %> <%= t("layouts.footer.contact_us") %>
<%= link_to t("layouts.footer.faq"), page_path('faq') %> <%= link_to t("layouts.footer.faq"), faq_path %>
</p> </p>
</div> </div>
<div class="footer-sections small-12 large-8 column"> <div class="footer-sections small-12 large-8 column">
<div class="small-12 medium-4 column"> <div class="small-12 medium-4 column">
<h2> <%= link_to t("layouts.footer.participation_title"), root_path, class: "title" %>
<%= link_to t("layouts.footer.participation_title"), root_path %>
</h2>
<p><%= t("layouts.footer.participation_text") %></p> <p><%= t("layouts.footer.participation_text") %></p>
</div> </div>
<div class="small-12 medium-4 column"> <div class="small-12 medium-4 column">
<h2> <%= link_to t("layouts.footer.transparency_title"), setting['transparency_url'].presence || t("layouts.footer.transparency_url"), class: "title", rel: "nofollow" %>
<%= link_to t("layouts.footer.transparency_title"), setting['transparency_url'].presence || t("layouts.footer.transparency_url") %>
</h2>
<p><%= t("layouts.footer.transparency_text") %></p> <p><%= t("layouts.footer.transparency_text") %></p>
</div> </div>
<div class="small-12 medium-4 column"> <div class="small-12 medium-4 column">
<h2> <%= link_to t("layouts.footer.open_data_title"), setting['opendata_url'].presence || t("layouts.header.external_link_opendata_url"), class: "title", rel: "nofollow" %>
<%= link_to t("layouts.footer.open_data_title"), setting['opendata_url'].presence || t("layouts.header.external_link_opendata_url") %>
</h2>
<p><%= t("layouts.footer.open_data_text") %></p> <p><%= t("layouts.footer.open_data_text") %></p>
</div> </div>
</div> </div>
@@ -54,7 +48,7 @@
<ul> <ul>
<% if setting['twitter_handle'] %> <% if setting['twitter_handle'] %>
<li class="inline-block"> <li class="inline-block">
<%= link_to "https://twitter.com/#{setting['twitter_handle']}", target: "_blank", title: t("social.twitter") + t('shared.target_blank_html') do %> <%= link_to "https://twitter.com/#{setting['twitter_handle']}", target: "_blank", title: t("social.twitter") + t('shared.target_blank_html'), rel: "nofollow" do %>
<span class="sr-only"><%= t("social.twitter") %></span> <span class="sr-only"><%= t("social.twitter") %></span>
<span class="icon-twitter" aria-hidden="true"></span> <span class="icon-twitter" aria-hidden="true"></span>
<% end %> <% end %>
@@ -62,7 +56,7 @@
<% end %> <% end %>
<% if setting['facebook_handle'] %> <% if setting['facebook_handle'] %>
<li class="inline-block"> <li class="inline-block">
<%= link_to "https://www.facebook.com/#{setting['facebook_handle']}/", target: "_blank", title: t("social.facebook") + t('shared.target_blank_html') do %> <%= link_to "https://www.facebook.com/#{setting['facebook_handle']}/", target: "_blank", title: t("social.facebook") + t('shared.target_blank_html'), rel: "nofollow" do %>
<span class="sr-only"><%= t("social.facebook") %></span> <span class="sr-only"><%= t("social.facebook") %></span>
<span class="icon-facebook" aria-hidden="true"></span> <span class="icon-facebook" aria-hidden="true"></span>
<% end %> <% end %>
@@ -70,7 +64,7 @@
<% end %> <% end %>
<% if setting['blog_url'] %> <% if setting['blog_url'] %>
<li class="inline-block"> <li class="inline-block">
<%= link_to setting['blog_url'], target: "_blank", title: t("social.blog") + t('shared.target_blank_html') do %> <%= link_to setting['blog_url'], target: "_blank", title: t("social.blog") + t('shared.target_blank_html'), rel: "nofollow" do %>
<span class="sr-only"><%= t("social.blog") %></span> <span class="sr-only"><%= t("social.blog") %></span>
<span class="icon-blog" aria-hidden="true"></span> <span class="icon-blog" aria-hidden="true"></span>
<% end %> <% end %>
@@ -78,7 +72,7 @@
<% end %> <% end %>
<% if setting['youtube_handle'] %> <% if setting['youtube_handle'] %>
<li class="inline-block"> <li class="inline-block">
<%= link_to "https://www.youtube.com/#{setting['youtube_handle']}", target: "_blank", title: t("social.youtube") + t('shared.target_blank_html') do %> <%= link_to "https://www.youtube.com/#{setting['youtube_handle']}", target: "_blank", title: t("social.youtube") + t('shared.target_blank_html'), rel: "nofollow" do %>
<span class="sr-only"><%= t("social.youtube") %></span> <span class="sr-only"><%= t("social.youtube") %></span>
<span class="icon-youtube" aria-hidden="true"></span> <span class="icon-youtube" aria-hidden="true"></span>
<% end %> <% end %>
@@ -86,7 +80,7 @@
<% end %> <% end %>
<% if setting['telegram_handle'] %> <% if setting['telegram_handle'] %>
<li class="inline-block"> <li class="inline-block">
<%= link_to "https://www.telegram.me/#{setting['telegram_handle']}", target: "_blank", title: t("social.telegram") + t('shared.target_blank_html') do %> <%= link_to "https://www.telegram.me/#{setting['telegram_handle']}", target: "_blank", title: t("social.telegram") + t('shared.target_blank_html'), rel: "nofollow" do %>
<span class="sr-only"><%= t("social.telegram") %></span> <span class="sr-only"><%= t("social.telegram") %></span>
<span class="icon-telegram" aria-hidden="true"></span> <span class="icon-telegram" aria-hidden="true"></span>
<% end %> <% end %>

View File

@@ -3,12 +3,14 @@
<%= link_to t("layouts.header.external_link_transparency"), <%= link_to t("layouts.header.external_link_transparency"),
setting['transparency_url'].presence || t("layouts.header.external_link_transparency_url"), setting['transparency_url'].presence || t("layouts.header.external_link_transparency_url"),
target: "_blank", target: "_blank",
rel: "nofollow",
title: t('shared.target_blank_html') %> title: t('shared.target_blank_html') %>
</li> </li>
<li> <li>
<%= link_to t("layouts.header.external_link_opendata"), <%= link_to t("layouts.header.external_link_opendata"),
setting['opendata_url'].presence || t("layouts.header.external_link_opendata_url"), setting['opendata_url'].presence || t("layouts.header.external_link_opendata_url"),
target: "_blank", target: "_blank",
rel: "nofollow",
title: t('shared.target_blank_html') %> title: t('shared.target_blank_html') %>
</li> </li>
@@ -17,6 +19,7 @@
<%= link_to t("layouts.header.external_link_blog"), <%= link_to t("layouts.header.external_link_blog"),
setting['blog_url'], setting['blog_url'],
target: "_blank", target: "_blank",
rel: "nofollow",
title: t('shared.target_blank_html') %> title: t('shared.target_blank_html') %>
</li> </li>
<% end %> <% end %>

View File

@@ -15,7 +15,11 @@ SitemapGenerator::Sitemap.create do
add page_name if page_name.present? add page_name if page_name.present?
end end
add "help_translate" add more_info_path
add how_to_use_path
add faq_path
add participation_facts_path
add participation_world_path
add debates_path, priority: 0.7, changefreq: "daily" add debates_path, priority: 0.7, changefreq: "daily"
Debate.find_each do |debate| Debate.find_each do |debate|
@@ -27,10 +31,18 @@ SitemapGenerator::Sitemap.create do
add proposal_path(proposal), lastmod: proposal.updated_at add proposal_path(proposal), lastmod: proposal.updated_at
end end
add proposal_ballots_path
add spending_proposals_path, priority: 0.7, changefreq: "daily" add spending_proposals_path, priority: 0.7, changefreq: "daily"
SpendingProposal.find_each do |spending_proposal| SpendingProposal.find_each do |spending_proposal|
add spending_proposal_path(spending_proposal), lastmod: spending_proposal.updated_at add spending_proposal_path(spending_proposal), lastmod: spending_proposal.updated_at
end end
add budgets_path, priority: 0.7, changefreq: "daily"
Budget.find_each do |budget|
add budget_path(budget), lastmod: budget.updated_at
end
add polls_path, priority: 0.7, changefreq: "daily"
Poll.find_each do |poll|
add poll_path(poll), lastmod: poll.starts_at
end
end end

View File

@@ -3,3 +3,10 @@
# To ban all spiders from the entire site uncomment the next two lines: # To ban all spiders from the entire site uncomment the next two lines:
# User-agent: * # User-agent: *
# Disallow: / # Disallow: /
Disallow: /users/
Disallow: /comments/
Disallow: /*?*locale
Disallow: /*?*order
Disallow: /*?*search