Links in README.md file are broken when it was converted by jsdoc

142 views
Skip to first unread message

LIZ Nakano

unread,
Aug 31, 2016, 1:46:51 PM8/31/16
to JSDoc Users
Hello everyone,

I am using jsdoc to create javascript documents.  I added markdown plugin.  However, the links in the markdown file are broken.
I have a work directory

 workDir/
   README.md
   docs/something.md
   jsdoc/


When the README.md is included in the jsconfig.json file, the jsdoc generated the javascript documents and put in the out directory jsdoc/.   However, the links in the REDME.md are all broken.

For example, in the README.md file, there is a link:
   See [something.md] (docs/something.md)

When the link  [something.md] is clicked, it showed 404 Not Found error because the link translated to jsdoc/docs/something.md.   In jsdoc directory, there is no docs
directory.  

Anyone knows how to fix this problem?  Any help is highly appreciated.  

Thanks!


Here is my configuration file:

{
"tags": {
"allowUnknownTags| ": true,
"dictionaries": ["jsdoc","closure"]
},
"source": {
"include": [
"src/firefly/js/api/",
"src/firefly/js/tables/TableUtil.js",
"src/firefly/js/charts/XYPlotCntlr.js",
"src/firefly/js//visualize/CsysConverter.js",
"src/firefly/js/visualize/DrawLayerCntlr.js"
// ,"src/firefly/js/charts/HistogramCntlr.js"
,"README.md"

],
"exclude": [
//"src/firefly/js/api/ApiBuild.js"
],
//include .js, .jsdoc and jsx files
"includePattern": ".+\\.js(doc)?|(x)$",
//Any file starting with an underscore or in a directory starting with an underscore will be ignored
"excludePattern": "(^|\\/|\\\\)_"
},

"plugins": [
"plugins/markdown",
"plugins/summarize"
],

"markdown" : {
"idInHeadings" : true
},

"jsx": {
"extensions": ["js", "jsx"]
},
"staticFiles": {
"include": ["./docs"],
"exclude": ["./docs/firefly-api-code-examples.md"],
"includePattern": ".+\\.md?$",
// "excludePattern": "(^|\\/|\\\\)_",
"recursive": true//,
//"recursiveLevel": 2,
},

"templates": {
"minami": {
// "default": {
"staticFiles": {
"include": ["./docs/"],
"exclude": ["./docs/firefly-api-code-examples.md"],
// "includePattern": ".+\\.md?$",
// "excludePattern": "(^|\\/|\\\\)_",
"recursive": true//,
//"recursiveLevel": 2,
}

}
},
"opts": {
"template": "node_modules/minami", //use the minami template insetad of the default
// "template": "templates/default",//default", // same as -t templates/default
"encoding": "utf8", // same as -e utf8
"destination": "./jsdoc/", // same as -d ./out/
"recurse": true , //, // same as -r
"tutorials": "./tutorial/", // same as -u path/to/tutorials
"access": "all" //same as -a <value>, values are all, public, private etc

},
"templates": {
"cleverLinks": false,
"monospaceLinks": false,
"default": {
"outputSourceFiles": true
}
}
}

Reply all
Reply to author
Forward
0 new messages