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;
}
h2 a {
border-bottom: 1px solid $text-light;
display: block;
font-size: rem-calc(24);
line-height: rem-calc(31);
padding-bottom: $line-height/4;
a.title {
font-weight: bold;
text-decoration: none;
}
}

View File

@@ -1,6 +1,6 @@
<% if user_signed_in? %>
<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>
<% if current_user.notifications_count > 0 %>
<span class="icon-circle" aria-hidden="true"></span>
@@ -12,19 +12,24 @@
<% end %>
</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>
<%= link_to t("layouts.header.my_account_link"), account_path %>
<%= link_to t("layouts.header.my_account_link"),
account_path, rel: "nofollow" %>
</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>
<% else %>
<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>
<%= 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>
<% end %>

View File

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

View File

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

View File

@@ -15,7 +15,11 @@ SitemapGenerator::Sitemap.create do
add page_name if page_name.present?
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"
Debate.find_each do |debate|
@@ -27,10 +31,18 @@ SitemapGenerator::Sitemap.create do
add proposal_path(proposal), lastmod: proposal.updated_at
end
add proposal_ballots_path
add spending_proposals_path, priority: 0.7, changefreq: "daily"
SpendingProposal.find_each do |spending_proposal|
add spending_proposal_path(spending_proposal), lastmod: spending_proposal.updated_at
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

View File

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