Default “Home” text and content for JSDoc

后端 未结 5 1286
眼角桃花
眼角桃花 2020-12-30 23:38

After running a basic JSDoc compile/render from Node.js:

jsdoc file1.js file2.js

I get a well-formatted document using the default template

5条回答
  •  没有蜡笔的小新
    2020-12-31 00:12

    I had a similar but different problem with the Home Page. The small in-house JavaScript library that I wanted to generate JSDOC pages for was just a collection of global functions, and I didn't want to display the home page at all. I only want to display the global.html page.

    Since we use NPM to install JSDOC, I didn't want to duplicate the entire module just to customize the global page. Instead, I copied just the layout page to a separate directory and specified that in my jsdoc.json config file:

    "templates" : {
    "default": {
      "layoutFile": "config/layout.tmpl"
    }
    

    }

    and then I edited layout.tmpl to add a