Skip to content

Commit 86b3ea5

Browse files
authored
Merge pull request #63 from webdoc-js/fix/root-path
Fix/root path
2 parents d8466de + ac12c3e commit 86b3ea5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

example/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"unit-test": "",
2626
"build": "webdoc --tutorials ./tutorials --site-root example-documentation",
2727
"build-next": "cd .. && webdoc && cd example",
28-
"build-pixi-api": "cd ../../pixi-api && webdoc --site-root docs && cd ../webdoc/example"
28+
"build-pixi-api": "cd ../../pixi-api && webdoc --site-root docs && cd ../webdoc/example",
29+
"build-pixi-api-prod": "cd ../../pixi-api && webdoc --site-root pixi-api && cd ../webdoc/example"
2930
},
3031
"bugs": {
3132
"url": "https://github.com/SukantPal/webdoc/issues"

packages/webdoc-default-template/publish.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ exports.publish = (options /*: PublishOptions */) => {
5252
const docTree = options.documentTree;
5353
const outDir = path.normalize(options.config.opts.destination);
5454
const index = linker.createURI("index");
55+
const indexRelative = index.slice(linker.siteRoot.length + 1);
5556

5657
fse.ensureDir(outDir);
5758

@@ -79,7 +80,7 @@ exports.publish = (options /*: PublishOptions */) => {
7980

8081
outStaticFiles(outDir);
8182
outExplorerData(outDir, crawlData);
82-
outMainPage(path.join(outDir, index), pipeline, options.config);
83+
outMainPage(path.join(outDir, indexRelative), pipeline, options.config);
8384
outIndexes(outDir, pipeline, options.config, crawlData.index);
8485
outReference(outDir, pipeline, options.config, docTree);
8586
};

0 commit comments

Comments
 (0)