You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2014/12/15 11:44:08 UTC
[2/5] incubator-brooklyn-site git commit: Allow menus to include
hyperlinks
Allow menus to include hyperlinks
Menus were only allowed to link to other Jekyll-managed pages. This
allows hyperlinks to non-Jekyll-managed pages to be used. Currently, the
links must still be on the same site.
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn-site/commit/6dc6bde1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn-site/tree/6dc6bde1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn-site/diff/6dc6bde1
Branch: refs/heads/master
Commit: 6dc6bde1940ac7d3aa348e4e048e7f231a158ae9
Parents: cdad484
Author: Richard Downer <ri...@apache.org>
Authored: Wed Nov 26 16:28:44 2014 +0000
Committer: Richard Downer <ri...@apache.org>
Committed: Wed Nov 26 16:28:44 2014 +0000
----------------------------------------------------------------------
_plugins/site_structure.rb | 8 +++++++-
documentation.md | 1 +
2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn-site/blob/6dc6bde1/_plugins/site_structure.rb
----------------------------------------------------------------------
diff --git a/_plugins/site_structure.rb b/_plugins/site_structure.rb
index b3f3bb6..8b13568 100644
--- a/_plugins/site_structure.rb
+++ b/_plugins/site_structure.rb
@@ -46,7 +46,13 @@ module SiteStructure
page.data['parent'] = parent
if page.data['children']
page.data['children'].each do |c|
- c['reference'] = gen_structure(site, c['path'], page, navgroups)
+ if c['path']
+ # links to another Jekyll-managed page
+ c['reference'] = gen_structure(site, c['path'], page, navgroups)
+ elsif c['link']
+ # links to a not-Jekyll-managed page on this site
+ c['reference'] = { 'url' => c['link'], 'title' => c['title'] }
+ end
end
end
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn-site/blob/6dc6bde1/documentation.md
----------------------------------------------------------------------
diff --git a/documentation.md b/documentation.md
index 3734912..f68b12a 100644
--- a/documentation.md
+++ b/documentation.md
@@ -2,6 +2,7 @@
layout: normal
title: Documentation
children:
+- { link: v/0.7.0-M1, title: User Manual (0.7.0-M1) }
- { path: glossary.md }
- { path: documentation/install-on-server.md }
---