You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2018/07/24 12:50:21 UTC

[2/5] mesos git commit: Fixed breadcrumb links in site templates.

Fixed breadcrumb links in site templates.

This patch makes sure that we do not leak newlines into breadcrumb
links created from page titles, and fixes the handling of spaces which
are represented with dashes.

Review: https://reviews.apache.org/r/67903/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/859e9079
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/859e9079
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/859e9079

Branch: refs/heads/master
Commit: 859e90795b237f36b78ecf2a660d182d2d4a2f92
Parents: 395d541
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Tue Jul 24 12:35:19 2018 +0200
Committer: Benjamin Bannier <bb...@apache.org>
Committed: Tue Jul 24 12:35:19 2018 +0200

----------------------------------------------------------------------
 site/source/layouts/basic.erb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/859e9079/site/source/layouts/basic.erb
----------------------------------------------------------------------
diff --git a/site/source/layouts/basic.erb b/site/source/layouts/basic.erb
index fc59f00..fa95fcd 100644
--- a/site/source/layouts/basic.erb
+++ b/site/source/layouts/basic.erb
@@ -70,12 +70,12 @@
 
           <li><a href="http://mesos.apache.org">Apache Mesos</a></li>
           <% if current_page.data.breadcrumb %>
-          <li><a href="/<%= current_page.data.breadcrumb.delete(' ').downcase %>/"><%= current_page.data.breadcrumb %></a></li>
+          <li><a href="/<%= current_page.data.breadcrumb.chomp.gsub(/\s+/, '-').downcase %>/"><%= current_page.data.breadcrumb %></a></li>
           <% elsif content_for?(:page_title) %>
           <% if yield_content(:page_title) == "Documentation" %>
           <li><a href="/documentation/latest/"><%= yield_content :page_title %></a></li>
           <% else %>
-          <li><a href="/<%= yield_content(:page_title).downcase %>/"><%= yield_content :page_title %></a></li>
+          <li><a href="/<%= yield_content(:page_title).downcase.chomp %>/"><%= yield_content(:page_title).chop %></a></li>
           <% end %>
           <% end %>
         </ul><!-- /.breadcrumb -->