diff --git a/public/_includes/_util-fns.jade b/public/_includes/_util-fns.jade index ac4f76d92f..396bfa35df 100644 --- a/public/_includes/_util-fns.jade +++ b/public/_includes/_util-fns.jade @@ -100,10 +100,11 @@ mixin makeExcerpt(_filePath, _region, _title, stylePatterns) - if (title) title = title + ' (' + excerpt + ')'; +makeExample(filePath, region, title, stylePatterns)(format='.') -//- Extract the doc example name from `current`. +//- Get the doc example name either from `_example` if set, or +//- extract the example name from `current`. - var getExampleName = function() { - var dir = current.path[current.path.length - 1]; -- return dir == 'latest' ? current.source : dir; +- return _example ? _example : dir == 'latest' ? current.source : dir; - }; mixin makeTabs(filePaths, regions, tabNames, stylePatterns)