mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Add ability to define custom link for ToC, and add link for spiderable
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
{{/if}}
|
||||
{{#if type "section"}}
|
||||
{{#nav_section}}
|
||||
<a href="#/full/{{id}}" class="{{maybe_current}} {{style}}">
|
||||
<a href="{{link}}" class="{{maybe_current}} {{style}}">
|
||||
{{#if prefix}}{{prefix}}.{{/if}}{{#if instance}}<i>{{instance}}</i>.{{/if}}{{name}}
|
||||
</a>
|
||||
{{/nav_section}}
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user