diff --git a/src/tmpl/docs.jade b/src/tmpl/docs.jade index 7feae34f..f68a1afc 100644 --- a/src/tmpl/docs.jade +++ b/src/tmpl/docs.jade @@ -17,15 +17,18 @@ block content ul.nav.nav-list each link in sidebar if link.url - if locals.rootSidebar - li - a(href='/' + link.url, class=locals.pageSegment == link.url && 'active')= link.name + - var linkHref + if link.external + - linkHref = link.url + else if locals.rootSidebar + - linkHref = '/' + link.url else - li - a(href='/' + page + '/' + link.url, class=locals.pageSegment == link.url && 'active')= link.name + - linkHref = '/' + page + '/' + link.url + li + a(href=linkHref, class=locals.pageSegment == link.url && 'active')= link.name else li.nav-header if link.icon i(class=link.icon) span= link.name - include blocks/advertisements \ No newline at end of file + include blocks/advertisements diff --git a/tasks/docs.js b/tasks/docs.js index 28f6637b..76fbc3bd 100644 --- a/tasks/docs.js +++ b/tasks/docs.js @@ -99,6 +99,12 @@ module.exports = function (grunt) { sidebars[0] = getSidebarSection('## API', 'icon-cog'); sidebars[1] = getSidebarSection('### Other'); + sidebars[1].push({ + name: 'GitHub', + url: 'https://github.com/gruntjs/', + external: true + }); + names.forEach(function (name) { var src = base + name + '.md', dest = 'build/api/' + name.toLowerCase() + '.html';