brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [06/44] incubator-brooklyn git commit: site_structure many more features for customising menus
Date Fri, 09 Jan 2015 15:34:35 GMT
site_structure many more features for customising menus

parse all pages, so pages not in root hierarchy can have menus and set breadcrumbs;
also allow overriding menus in `children`, and proxying other pages,
and use path map from config for url rewriting
(so nothing in site_structure is specific to this project).

all documented as comments in `site_structure.rb`


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/5c384d8b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/5c384d8b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/5c384d8b

Branch: refs/heads/master
Commit: 5c384d8b60d8ecdcd2a7a5cf327e9f1936c5d9d3
Parents: 6da2ea9
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Wed Dec 24 12:21:06 2014 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Wed Jan 7 14:20:39 2015 +0000

----------------------------------------------------------------------
 docs/_config.yml                         |   2 +
 docs/_layouts/website-normal.html        |   8 +-
 docs/_plugins/site_structure.rb          | 201 +++++++++++++++++++++-----
 docs/guide/index.md                      |  11 +-
 docs/guide/ops/index.md                  |   6 +
 docs/website/documentation.md            |  19 ---
 docs/website/documentation/glossary.md   |  92 ++++++++++++
 docs/website/documentation/index.md      |  23 +++
 docs/website/documentation/other-docs.md |  12 ++
 docs/website/download.md                 |  40 -----
 docs/website/download/index.md           |  40 +++++
 docs/website/glossary.md                 |  92 ------------
 docs/website/index.md                    |  10 +-
 13 files changed, 352 insertions(+), 204 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/_config.yml
----------------------------------------------------------------------
diff --git a/docs/_config.yml b/docs/_config.yml
index d20078e..8e36167 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -36,6 +36,8 @@ dependency_urls:
   bootstrap.js: https://netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js
   jquery.js: https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js
 
+root_menu_page: /website/index.md
+
 # These files should not be included in the final build (in addition to _* contents)
 exclude: ['/Gemfile*','/README.md']
 

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/_layouts/website-normal.html
----------------------------------------------------------------------
diff --git a/docs/_layouts/website-normal.html b/docs/_layouts/website-normal.html
index c253664..d4096a6 100644
--- a/docs/_layouts/website-normal.html
+++ b/docs/_layouts/website-normal.html
@@ -41,7 +41,7 @@ layout: website-base
     {% if page.menu_parent.landing %} {% comment %} case 2 {% endcomment %}
               {% for item in page.breadcrumb_pages offset:1 %}
                   <h4 class="{% if forloop.index0 > 0 %} with_preceding{% endif %}{%
if forloop.rindex0 > 0 %} with_following{% endif %}">
-                    <a href="{{item.url}}" class="list-group-item{% if item.path == page.path
%} active{% endif %} breadcrumb breadcrumb{{ forloop.index0 }}">
+                    <a href="{{item.url}}" class="list-group-item{% if item.path == page.menu_path
%} active{% endif %} breadcrumb breadcrumb{{ forloop.index0 }}">
                       {{ item.title_in_menu }}</a></h4>
               {% endfor %}
               {% for item in page.menu %}
@@ -51,11 +51,11 @@ layout: website-base
     {% else %} {% comment %} case 3a {% endcomment %}
               {% for item in page.menu_parent.breadcrumb_pages offset:1 %}
                   <h4 class="{% if forloop.index0 > 0 %} with_preceding{% endif %}{%
if forloop.rindex0 > 0 %} with_following{% endif %}">
-                    <a href="{{item.url}}" class="list-group-item{% if item.path == page.path
%} active{% endif %} breadcrumb breadcrumb{{ forloop.index0 }}">
+                    <a href="{{item.url}}" class="list-group-item{% if item.path == page.menu_path
%} active{% endif %} breadcrumb breadcrumb{{ forloop.index0 }}">
                       {{ item.title_in_menu }}</a></h4>
               {% endfor %}
               {% for item in page.menu_parent.menu %}
-                {% if (page.breadcrumb_paths contains item.path) and page.menu %}
+                {% if (page.breadcrumb_paths contains item.menu_path) and page.menu %}
                   {% comment %} case 3b {% endcomment %}
                   <a href="{{item.url}}" class="list-group-item active with-sub-item">{{
item.title_in_menu }}</a>
                   <div class="sub-item">
@@ -66,7 +66,7 @@ layout: website-base
                   </div>
                 {% else %}
                   {% comment %} case 3a side menu item {% endcomment %}
-                  <a href="{{item.url}}" class="list-group-item{% if page.breadcrumb_paths
contains item.path %} active{% endif %}">{{ item.title_in_menu }}</a>
+                  <a href="{{item.url}}" class="list-group-item{% if page.breadcrumb_paths
contains item.menu_path %} active{% endif %}">{{ item.title_in_menu }}</a>
                 {% endif %}
               {% endfor %}
         

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/_plugins/site_structure.rb
----------------------------------------------------------------------
diff --git a/docs/_plugins/site_structure.rb b/docs/_plugins/site_structure.rb
index 44fec4f..f8f6c6a 100644
--- a/docs/_plugins/site_structure.rb
+++ b/docs/_plugins/site_structure.rb
@@ -1,24 +1,64 @@
+#
 # Builds a hierarchical structure for the site, based on the YAML front matter of each page
-# Starts from a page called "index.md", and follows "children" links in the YAML front matter
+#
+# Starts from a page called "/index.md" (or the value of `root_menu_page` in _config.yml),
+# and follows `children` links in the YAML front matter, building up a variable called `data`

+# on `site` and on each referred `page`.
+#
+# In Ruby data is in page.data['menu'], but in templates `page.data` is promoted, 
+# so you should just refer to things in markdown as `{{ page.menu }}`.
+#
+# Each `page.menu` entry will contain:
+# * `url` - URL (relative or absolute) to link to
+# * `title_in_menu` - title to show
+# * `menu_path` - the path of this page for the purposes of looking in breadcrumbs (usually
page.path, unless overriden) 
+# * `breadcrumbs_pages` - page items for ancestor items (and self)
+# * `breadcrumbs_paths` - paths of breadcrumb pages (useful for `if .. contains` jekyll tests)
+# * `menu_parent` - the parent menu which contains this page
+# * (in addition the entry may *be* the actual page object when the item is a page whose
menu is not overridden)
+#
+# To build, set `children` as a list of either strings (the relative or absolute path to
the child .md file),
+# or as maps with a `path` or `link` (absolute URL) key, a `title` (optional for `path`,
to override the title from the file),
+# and (for `path` only) an optional `menu` block (to override the menu inherited from the
`children` records in file).
+#
+# For instance:
+#
+#children:
+#- child.md
+#- { path: child.md }  # identical to above
+#- { path: child.md, title: "Child with New Name" }  # overriding name
+#- { path: child.md, menu: [ { path: subchild.md, title: "Sub-Child with New Name" } ] }
 # custom sub-menu with custom title
+#- { path: child.md, menu: null }  # suppress sub-menu (note `null` not `nil` because this
is yaml)
+#
+# The menu is automatically generated for all files referenced from the root menu.
+# You can also set `breadcrumbs` as a list of paths in a page to force breadcrumbs, and
+# `menu_proxy_for` to have `menu_path` set differently to the usual `path` (to fake breadcrumbs).
+# 
+# Additionally URL rewriting is done if a path map is set in _config.yaml,
+# with `path: { xxx: /new_xxx }` causing `/xxx/foo.html` to be rewritten as `/new_xxx/foo.html`.
+#
 module SiteStructure
- 
-  BROOKLYN_WEBSITE_ROOT = "/website/index.md" unless defined? BROOKLYN_WEBSITE_ROOT
+
+  DEBUG = false
   
+#  require 'pp'
+
   class Generator < Jekyll::Generator
 
-    def find_page_with_path_absolute_or_relative_to(site, path, referrent, structure_processed_pages)
+    def self.find_page_with_path_absolute_or_relative_to(site, path, referrent, structure_processed_pages)
       uncleaned_path = path
       
       # Pathname API ignores first arg below if second is absolute
 #      puts "converting #{path} wrt #{referrent ? referrent.path : ""}"
       file = Pathname.new(File.dirname(referrent ? referrent.path : "")) + path
+      file += "index.md" if file.to_s.end_with? "/"
       file = file.cleanpath
       # is there a better way to trim a leading / ?
       file = file.relative_path_from(Pathname.new("/")) unless file.relative?
       path = "#{file}"
         
       # look in our cache        
-      page = structure_processed_pages.detect { |item| item['path'] == path }
+      page = structure_processed_pages[path]
       return page if page != nil
       
       # look in site cache
@@ -30,80 +70,161 @@ module SiteStructure
 
       unless page
         # could not load it from pages, look on disk
-                 
-        raise "No such file #{path} in site_structure call (from #{referrent ? referrent.path
: ""})" unless file.exist?
-#        puts "INFO: reading excluded file #{file} for site structure generation"
-        page = Jekyll::Page.new(site, site.source, File.dirname(file), File.basename(file))
-        
-        throw "Could not find a page called: #{path} (referenced from #{referrent ? referrent.path
: "root"})" unless page
+
+        if file.exist?                 
+          puts "INFO: reading excluded file #{file} for site structure generation" unless
SiteStructure::DEBUG
+          page = Jekyll::Page.new(site, site.source, File.dirname(file), File.basename(file))
+        end
+ 
+        unless page
+          raise "No such file #{path} in site_structure call (from #{referrent ? referrent.path
: ""})" unless SiteStructure::DEBUG
+          puts "Could not find a page called: #{path} (referenced from #{referrent ? referrent.path
: "root"}); skipping"
+          return nil
+        end
       end
 
       # now apply standard clean-up
-      if (page.url.start_with?("/website"))
-        page.url.slice!("/website")
-        page.url.prepend(site.config['path']['website'])
-      end
-      if (page.url.start_with?("/guide"))
-        page.url.slice!("/guide")
-        page.url.prepend(site.config['path']['guide'])
-      end
+      if ((site.config['path']) && (site.config['path'].is_a? Hash))
+        site.config['path'].each {|key, value| 
+          if (page.url.start_with?("/"+key))
+            page.url.slice!("/"+key)
+            page.url.prepend(value)
+          end
+        }
+      end 
+      
       # and put in cache
-      structure_processed_pages << page
+      structure_processed_pages[path] = page
  
       page     
     end
 
     def generate(site)
-      site.data.merge!( gen_structure(site, { 'path' => SiteStructure::BROOKLYN_WEBSITE_ROOT
}, nil, [], [], []).data )
+      
+      structure_processed_pages = {}
+      # process root page
+      root_menu_page = site.config['root_menu_page']
+      site.data.merge!( Generator.gen_structure(site, { 'path' => root_menu_page }, nil,
[], [], structure_processed_pages).data ) if root_menu_page
+      # process all pages
+      site.pages.each { |p| 
+        Generator.gen_structure(site, { 'path' => p.path }, nil, [], [], structure_processed_pages)
if p.path.end_with? ".md"
+      }
+      site.data['structure_processed_pages'] = structure_processed_pages
 #      puts "ROOT MENU is #{site.data['menu']}"
-#      puts "C1 sub-menu is #{site.data['menu'][0].data['menu'}"
-#but note after processing 'data' on pages is promoted, so you access it like:
-#      puts "C1 sub-menu will be #{site.data['menu'][0]['menu'}"
+#      puts "PAGE menu is #{structure_processed_pages['/website/index.md'].data['menu'}"
+#but in the context hash map 'data' on pages is promoted, so you access it like {{ page.menu
}}
     end
 
     # processes liquid tags, e.g. in a link or path object
-    def render_liquid(site, page, content)
+    def self.render_liquid(site, page, content)
       return content unless page
       info = { :filters => [Jekyll::Filters], :registers => { :site => site, :page
=> page } }
       page.render_liquid(content, site.site_payload, info)
     end
         
-    def gen_structure(site, item, parent, breadcrumb_pages, breadcrumb_paths, structure_processed_pages)
+    def self.gen_structure(site, item, parent, breadcrumb_pages_in, breadcrumb_paths_in,
structure_processed_pages)
 #      puts "gen_structure #{item}"
-      breadcrumb_pages = breadcrumb_pages.dup
-      breadcrumb_paths = breadcrumb_paths.dup
+      breadcrumb_pages = breadcrumb_pages_in.dup
+      breadcrumb_paths = breadcrumb_paths_in.dup
+      if (item.is_a? String)
+        item = { 'path' => item }
+      end
       if (item['path'])      
         page = find_page_with_path_absolute_or_relative_to(site, render_liquid(site, parent,
item['path']), parent, structure_processed_pages)
-        data = page.data
+        # if find_page doesn't raise, we are in debug, silently ignore
+        return nil unless page
+        # build up the menu info
+        if (item.length==1)
+          data = page.data
+          result = page
+        else
+          # if other fields set on 'item' then we are overriding, so we have to take a duplicate
+          unless page['menu']
+            # force processing if not yet processed, breadcrumbs etc set from that page
+            page = gen_structure(site, "/"+page.path, parent, breadcrumb_pages_in, breadcrumb_paths_in,
structure_processed_pages)
+          end
+          data = page.data.dup
+          data['data'] = data
+          result = data
+        end 
         data['path'] = page.path
+        data['url'] = page.url
+        data['page'] = page
         breadcrumb_pages << page
         breadcrumb_paths << page.path
       elsif (item['link'])
-        data = { 'link' => render_liquid(site, parent, item['link']) }
-        page = { 'data' => data }
+        link = render_liquid(site, parent, item['link'])
+        data = { 'link' => link, 'url' => link }
         breadcrumb_pages << data
-        breadcrumb_paths << item['link']
+        breadcrumb_paths << data['link']
+        data['data'] = data
+        result = data
       else
         raise "Link to #{item} in #{parent ? parent.path : nil} must have link or path"
       end
-      
-      data['breadcrumb_pages'] = breadcrumb_pages
-      data['breadcrumb_paths'] = breadcrumb_paths
-      data['menu_parent'] = parent
+
+      data['breadcrumb_pages'] ||= breadcrumb_pages
+      data['breadcrumb_paths'] ||= breadcrumb_paths
+      data['menu_parent'] ||= parent
       
       data['title_in_menu'] = item['title_in_menu'] || item['title'] || data['title_in_menu']
|| data['title']
 #      puts "built #{data}, now looking at children"
+
+      # if already processed then return now that we have set custom item overrides (don't
recurse through children)
+      return result if data['menu']
+      
+      data['menu_path'] = page.path if page
       
+      if data['menu_proxy_for']
+        menu_proxy_for = gen_structure(site, { 'path' => data['menu_proxy_for'], 'no_copy'
=> "because breadcrumbs won't be right" }, page, [], [], structure_processed_pages)
+        raise "missing menu_proxy_for #{data['menu_proxy_for']} in #{page.path}" unless menu_proxy_for
+        data['menu_path'] = menu_proxy_for['path']
+        data.merge!(menu_proxy_for.select {|key, value| ['menu', 'breadcrumb_paths', 'breadcrumb_pages',
'menu_parent'].include?(key) })
+      end
+      
+      if data['breadcrumbs']
+        # if custom breadcrumbs set on page, use them instead
+        data['breadcrumb_pages'] = data['breadcrumbs'].collect { |path|
+          result = find_page_with_path_absolute_or_relative_to(site, render_liquid(site,
parent, path), page, structure_processed_pages)
+          raise "missing breadcrumb #{path} in #{page.path}" unless result
+          result
+        }
+        data['breadcrumb_paths'] = data['breadcrumb_pages'].collect { |p| p.path }
+      end
+
+      if data['menu_parent'] 
+        if data['menu_parent'].is_a? String
+          # if custom menu_parent was set as a string then load it
+          result = find_page_with_path_absolute_or_relative_to(site, render_liquid(site,
parent, data['menu_parent']), page, structure_processed_pages)        
+          raise "missing parent #{data['menu_parent']} in #{page['path']}" unless result
+          data['menu_parent'] = result
+        end
+      else
+        # set menu_parent from breadcrumbs if not set (e.g. we are loading an isolated page)
+        data['menu_parent'] = page['breadcrumb_pages'][-1]
+      end
+
       if (data['children'])
         data['menu'] = []
         data['children'].each do |child|
-          data['menu'] << gen_structure(site, child, page, breadcrumb_pages, breadcrumb_paths,
structure_processed_pages)
+          sub = gen_structure(site, child, page, breadcrumb_pages, breadcrumb_paths, structure_processed_pages)
+          if sub
+            if (!(child.is_a? String) && child.has_key?('menu'))
+              # process custom menu override
+              sub['menu'] = child['menu']
+              if (sub['menu'] != nil)
+                sub['menu'] = sub['menu'].collect { |mi| 
+                  gen_structure(site, mi, page, breadcrumb_pages, breadcrumb_paths, structure_processed_pages)
+                }
+                sub['menu'].compact!
+              end
+            end
+            data['menu'] << sub
+          end
         end
       end
       
-      page
+      result
     end
-    
   end
-
 end

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/guide/index.md
----------------------------------------------------------------------
diff --git a/docs/guide/index.md b/docs/guide/index.md
index bf52546..c743561 100644
--- a/docs/guide/index.md
+++ b/docs/guide/index.md
@@ -2,14 +2,17 @@
 title: User Guide
 layout: website-normal
 children:
-- { path: start/index.md }
-- { path: yaml/index.md }
-- { path: java/index.md }
+- { path: /guide/start/index.md }
+- { path: /guide/yaml/index.md }
+- { path: /guide/java/index.md }
+- { path: /guide/ops/index.md }
+- { path: /website/documentation/other-docs.md }
 ---
 
 This is the user guide.
 
 TODO - wip
 
-END
+add dev
 
+END

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/guide/ops/index.md
----------------------------------------------------------------------
diff --git a/docs/guide/ops/index.md b/docs/guide/ops/index.md
new file mode 100644
index 0000000..114ade4
--- /dev/null
+++ b/docs/guide/ops/index.md
@@ -0,0 +1,6 @@
+---
+title: Operations
+layout: website-normal
+---
+
+TODO

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/website/documentation.md
----------------------------------------------------------------------
diff --git a/docs/website/documentation.md b/docs/website/documentation.md
deleted file mode 100644
index 9b9edc8..0000000
--- a/docs/website/documentation.md
+++ /dev/null
@@ -1,19 +0,0 @@
----
-layout: website-normal
-title: Documentation
-children:
-- { path: ../guide/index.md, title_in_menu: User Guide }
-- { path: glossary.md }
-- { path: documentation/install-on-server.md }
----
-
-## Official User Manual
-
-Our main user manual is organised by release version. Please pick the version that you are
using:
-
-- [0.7.0-M1]({{ site.path.v }}/0.7.0-M1) -
-  Please note that this release was made prior to entering the Apache Incubator,
-  and therefore it is not endorsed by Apache.
-
-## Server install
-Follow this [guide](documentation/install-on-server.html) to install Brooklyn on a production
server.

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/website/documentation/glossary.md
----------------------------------------------------------------------
diff --git a/docs/website/documentation/glossary.md b/docs/website/documentation/glossary.md
new file mode 100644
index 0000000..0651068
--- /dev/null
+++ b/docs/website/documentation/glossary.md
@@ -0,0 +1,92 @@
+---
+layout: website-normal
+title: Glossary
+---
+
+[//]: # (Abusing link groups to write comments that are not rendered in the document..)
+[//]: # (The links below reference the id attributes generated for the headers.)
+[//]: # (For example, the Autonomic section can be referred to with a link to #autonomic.)
+[//]: # (So if you alter any of the headers you should update the relevant link group too.)
+
+[autonomic]: #autonomic
+[blueprint]: #blueprint
+[effector]: #effector
+[entity]: #entity
+[policy]: #policy
+[sensor]: #sensor
+[YAML]: #yaml
+
+[//]: # (Note: Autonomic and blueprint section could link to learnmore page.)
+
+
+#### Autonomic
+
+Refers to the self-managing characteristics of distributed computing resources,
+adapting to unpredictable changes while hiding intrinsic complexity to
+operators and users.
+
+
+#### Blueprint
+
+A description of an application or system, which can be used for its automated
+deployment and runtime management. The blueprint describes a model of the
+application (i.e. its components, their configuration, and their
+relationships), along with policies for runtime management. The blueprint can
+be described in [YAML][].
+
+###### See also
+* [Documentation]({{site.path.website}}/learnmore/catalog/index.html) for the entity,
+  policy and enricher blueprints that Apache Brooklyn supports out-of-the-box.
+
+
+#### Effector
+
+An operation on an [entity][].
+
+
+#### Entity
+
+A component of an application or system. This could be a physical component, a
+service, a grouping of components, or a logical construct describing part of an
+application/system. It is a "managed element" in autonomic computing parlance.
+
+
+#### Policy
+
+Part of an autonomic management system, performing runtime management. A policy
+is associated with an [entity][]; it normally manages the health of that entity
+or an associated group of entities (e.g. HA policies or auto-scaling policies).
+
+
+#### Sensor
+
+An attribute of an [entity][].
+
+
+#### YAML
+
+A human-readable data format.
+
+###### See also
+* [Wikipedia article](http://en.wikipedia.org/wiki/YAML) on YAML
+
+
+#### Apache Jclouds
+
+An open source Java library that provides a consistent interface to many
+clouds. Apache Brooklyn uses Apache Jclouds as its core cloud abstraction.
+
+###### See also
+* [Project homepage](https://jclouds.apache.org/)
+
+
+#### CAMP and TOSCA
+
+OASIS Cloud Application Management for Platforms (CAMP) and OASIS Topology and
+Orchestration Specification for Cloud Applications (TOSCA) are specifications
+that aim to standardise the portability and management of cloud applications.
+
+###### See also
+* [CAMP homepage](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=camp)
+* [TOSCA homepage](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=tosca)
+

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/website/documentation/index.md
----------------------------------------------------------------------
diff --git a/docs/website/documentation/index.md b/docs/website/documentation/index.md
new file mode 100644
index 0000000..84600f0
--- /dev/null
+++ b/docs/website/documentation/index.md
@@ -0,0 +1,23 @@
+---
+layout: website-normal
+title: Documentation
+children:
+- { path: /guide/start/index.md, title_in_menu: Get Started }
+- { path: /guide/yaml/index.md, title_in_menu: YAML Blueprints }
+- { path: /guide/java/index.md, title_in_menu: Java Blueprints }
+- { path: /guide/ops/index.md }
+- { path: other-docs.md, title_in_menu: Other Resources }
+---
+
+TODO kill me
+
+## Official User Manual
+
+Our main user manual is organised by release version. Please pick the version that you are
using:
+
+- [0.7.0-M1]({{ site.path.v }}/0.7.0-M1) -
+  Please note that this release was made prior to entering the Apache Incubator,
+  and therefore it is not endorsed by Apache.
+
+## Server install
+Follow this [guide](documentation/install-on-server.html) to install Brooklyn on a production
server.

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/website/documentation/other-docs.md
----------------------------------------------------------------------
diff --git a/docs/website/documentation/other-docs.md b/docs/website/documentation/other-docs.md
new file mode 100644
index 0000000..d25b6ff
--- /dev/null
+++ b/docs/website/documentation/other-docs.md
@@ -0,0 +1,12 @@
+---
+title: Other Resources
+layout: website-normal
+children:
+- { path: glossary.md }
+- { path: install-on-server.md }
+- { path: ../meta/versions.md }
+- { path: ../meta/sitemap.md }
+---
+
+TODO
+

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/website/download.md
----------------------------------------------------------------------
diff --git a/docs/website/download.md b/docs/website/download.md
deleted file mode 100644
index 4cd5cdf..0000000
--- a/docs/website/download.md
+++ /dev/null
@@ -1,40 +0,0 @@
----
-layout: website-normal
-title: Download
-children:
-- { path: download/verify.md }
----
-
-## Latest Brooklyn Source Code Release
-
-[Download Apache Brooklyn {{ site.data.brooklyn.version }} from our mirror sites](https://www.apache.org/dyn/closer.cgi/incubator/brooklyn/{{
site.data.brooklyn.version }}/apache-brooklyn-{{ site.data.brooklyn.version }}.tar.gz)
-
-You can also verify that you build has not been tampered with by [verifying the hashes and
signatures](download/verify.html).
-
-
-## Build the Binary Package
-
-We do not yet have an official binary package for Apache Brooklyn. We plan to address this
in our next release. However,
-it is relatively easy to create the binary package from source code, if you have a working
JDK of at least version 6,
-and Maven 3.
-
-Unpack `apache-brooklyn-{{ site.data.brooklyn.version }}.tar.gz` and then execute this command
in the `apache-brooklyn-{{ site.data.brooklyn.version }}` folder:
-
-{% highlight bash %}
-mvn clean install -DskipTests
-{% endhighlight %}
-
-You can then find the binary distribution in the folder `usage/dist/target/brooklyn-dist`,
or archived as `usage/dist/target/brooklyn-{{ site.data.brooklyn.version }}-dist.tar.gz`.
-
-
-## Get Started!
-
-Take a look at the [Get Started](quickstart/) page!
-
-
-## Previous Versions
-
-Versions of Brooklyn prior to 0.7.0-M2 were all made prior to joining the Apache Incubator,
therefore **they are not
-endorsed by Apache** and are not hosted by Apache or their mirrors. You can obtain the source
code by [inspecting the
-branches of the pre-Apache GitHub repository](https://github.com/brooklyncentral/brooklyn/branches/stale)
and binary
-releases by [querying Maven Central for io.brooklyn:brooklyn.dist](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22io.brooklyn%22%20AND%20a%3A%22brooklyn-dist%22).

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/website/download/index.md
----------------------------------------------------------------------
diff --git a/docs/website/download/index.md b/docs/website/download/index.md
new file mode 100644
index 0000000..690c856
--- /dev/null
+++ b/docs/website/download/index.md
@@ -0,0 +1,40 @@
+---
+layout: website-normal
+title: Download
+children:
+- { path: verify.md }
+---
+
+## Latest Brooklyn Source Code Release
+
+[Download Apache Brooklyn {{ site.data.brooklyn.version }} from our mirror sites](https://www.apache.org/dyn/closer.cgi/incubator/brooklyn/{{
site.data.brooklyn.version }}/apache-brooklyn-{{ site.data.brooklyn.version }}.tar.gz)
+
+You can also verify that you build has not been tampered with by [verifying the hashes and
signatures](download/verify.html).
+
+
+## Build the Binary Package
+
+We do not yet have an official binary package for Apache Brooklyn. We plan to address this
in our next release. However,
+it is relatively easy to create the binary package from source code, if you have a working
JDK of at least version 6,
+and Maven 3.
+
+Unpack `apache-brooklyn-{{ site.data.brooklyn.version }}.tar.gz` and then execute this command
in the `apache-brooklyn-{{ site.data.brooklyn.version }}` folder:
+
+{% highlight bash %}
+mvn clean install -DskipTests
+{% endhighlight %}
+
+You can then find the binary distribution in the folder `usage/dist/target/brooklyn-dist`,
or archived as `usage/dist/target/brooklyn-{{ site.data.brooklyn.version }}-dist.tar.gz`.
+
+
+## Get Started!
+
+Take a look at the [Get Started](quickstart/) page!
+
+
+## Previous Versions
+
+Versions of Brooklyn prior to 0.7.0-M2 were all made prior to joining the Apache Incubator,
therefore **they are not
+endorsed by Apache** and are not hosted by Apache or their mirrors. You can obtain the source
code by [inspecting the
+branches of the pre-Apache GitHub repository](https://github.com/brooklyncentral/brooklyn/branches/stale)
and binary
+releases by [querying Maven Central for io.brooklyn:brooklyn.dist](http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22io.brooklyn%22%20AND%20a%3A%22brooklyn-dist%22).

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/website/glossary.md
----------------------------------------------------------------------
diff --git a/docs/website/glossary.md b/docs/website/glossary.md
deleted file mode 100644
index 0651068..0000000
--- a/docs/website/glossary.md
+++ /dev/null
@@ -1,92 +0,0 @@
----
-layout: website-normal
-title: Glossary
----
-
-[//]: # (Abusing link groups to write comments that are not rendered in the document..)
-[//]: # (The links below reference the id attributes generated for the headers.)
-[//]: # (For example, the Autonomic section can be referred to with a link to #autonomic.)
-[//]: # (So if you alter any of the headers you should update the relevant link group too.)
-
-[autonomic]: #autonomic
-[blueprint]: #blueprint
-[effector]: #effector
-[entity]: #entity
-[policy]: #policy
-[sensor]: #sensor
-[YAML]: #yaml
-
-[//]: # (Note: Autonomic and blueprint section could link to learnmore page.)
-
-
-#### Autonomic
-
-Refers to the self-managing characteristics of distributed computing resources,
-adapting to unpredictable changes while hiding intrinsic complexity to
-operators and users.
-
-
-#### Blueprint
-
-A description of an application or system, which can be used for its automated
-deployment and runtime management. The blueprint describes a model of the
-application (i.e. its components, their configuration, and their
-relationships), along with policies for runtime management. The blueprint can
-be described in [YAML][].
-
-###### See also
-* [Documentation]({{site.path.website}}/learnmore/catalog/index.html) for the entity,
-  policy and enricher blueprints that Apache Brooklyn supports out-of-the-box.
-
-
-#### Effector
-
-An operation on an [entity][].
-
-
-#### Entity
-
-A component of an application or system. This could be a physical component, a
-service, a grouping of components, or a logical construct describing part of an
-application/system. It is a "managed element" in autonomic computing parlance.
-
-
-#### Policy
-
-Part of an autonomic management system, performing runtime management. A policy
-is associated with an [entity][]; it normally manages the health of that entity
-or an associated group of entities (e.g. HA policies or auto-scaling policies).
-
-
-#### Sensor
-
-An attribute of an [entity][].
-
-
-#### YAML
-
-A human-readable data format.
-
-###### See also
-* [Wikipedia article](http://en.wikipedia.org/wiki/YAML) on YAML
-
-
-#### Apache Jclouds
-
-An open source Java library that provides a consistent interface to many
-clouds. Apache Brooklyn uses Apache Jclouds as its core cloud abstraction.
-
-###### See also
-* [Project homepage](https://jclouds.apache.org/)
-
-
-#### CAMP and TOSCA
-
-OASIS Cloud Application Management for Platforms (CAMP) and OASIS Topology and
-Orchestration Specification for Cloud Applications (TOSCA) are specifications
-that aim to standardise the portability and management of cloud applications.
-
-###### See also
-* [CAMP homepage](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=camp)
-* [TOSCA homepage](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=tosca)
-

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/5c384d8b/docs/website/index.md
----------------------------------------------------------------------
diff --git a/docs/website/index.md b/docs/website/index.md
index 481fb84..890c5e2 100644
--- a/docs/website/index.md
+++ b/docs/website/index.md
@@ -3,11 +3,11 @@ layout: website-landing
 title: Home
 landing: true
 children:
-- { path: learnmore/index.md }
-- { path: download.md }
-- { path: quickstart/index.md, title: Get Started }
-- { path: documentation.md }
-- { path: community/index.md }
+- learnmore/
+- { path: download/, menu: null }
+- { path: quickstart/, title: Get Started }
+- documentation/
+- community/
 ---
 
 <div class="jumbotron">


Mime
View raw message