Skip to content

Commit 60b1b6b

Browse files
fix bad path
1 parent ab52362 commit 60b1b6b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

middleware/demos.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ function loadFiles(dir, callback){
3131
async.map(arr, loadJSON, cb);
3232
}
3333
var loadToc = function(filesContent, cb){
34-
loadJSON(dir + '/toc-demos.json', function(err, data){
34+
var tocPath = path.join(dir, '/../', '/../', '/toc-demos.json');
35+
loadJSON(tocPath, function(err, data){
3536
cb(err, !err && {
3637
content: associate(Object.keys(data), filesContent),
3738
toc: data
@@ -51,7 +52,7 @@ module.exports = function(project, options){
5152
if (!options) options = {};
5253
if (!options.title) options.title = project;
5354

54-
var dir = path.join(__dirname, '..', pkg._buildOutput, project, 'docs');
55+
var dir = path.join(__dirname, '..', pkg._buildOutput, project, 'docs', 'demos', 'demos');
5556
var files = async.apply(loadFiles, dir);
5657
var loadDemos = waitForIt(files);
5758

0 commit comments

Comments
 (0)