From d6ec53b37d153eba5a4ce6629bcfd544263ddf7f Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 4 Dec 2014 12:16:49 -0800 Subject: [PATCH] Add ability to define custom link for ToC, and add link for spiderable --- docs/client/full-api/tableOfContents.html | 2 +- docs/client/full-api/tableOfContents.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/client/full-api/tableOfContents.html b/docs/client/full-api/tableOfContents.html index ac19579a7a..b27df1f9ba 100644 --- a/docs/client/full-api/tableOfContents.html +++ b/docs/client/full-api/tableOfContents.html @@ -12,7 +12,7 @@ {{/if}} {{#if type "section"}} {{#nav_section}} - + {{#if prefix}}{{prefix}}.{{/if}}{{#if instance}}{{instance}}.{{/if}}{{name}} {{/nav_section}} diff --git a/docs/client/full-api/tableOfContents.js b/docs/client/full-api/tableOfContents.js index 01d286ab1f..70b2a67e13 100644 --- a/docs/client/full-api/tableOfContents.js +++ b/docs/client/full-api/tableOfContents.js @@ -317,6 +317,7 @@ var toc = [ "random", "stylus", "showdown", + {name: "spiderable", link: "https://atmospherejs.com/meteor/spiderable"}, "stylus", "underscore", "webapp" @@ -364,9 +365,12 @@ Template.nav.helpers({ else { if (typeof(item) === "string") item = {name: item}; + + var id = item.name && name_to_id(item.name) || undefined; + ret.push(_.extend({ type: "section", - id: item.name && name_to_id(item.name) || undefined, + link: "#/full/" + id, depth: depth, style: '' }, item));