Question

JSDoc outputs a date in the footer of each page:

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Fri Jan 17 2014 14:30:54 GMT-0800 (PST)
</footer>

So whenever I rebuild my library, all the documentation files look like they've changed to Git. That's not desirable -- I only want to commit these docs when they actually change in content.

Can I cause JsDoc to not output this footer at all?

Was it helpful?

Solution 2

I have some modest experience with creating jsdoc 3 templates and I've looked at the code to check what you are asking. Here is what I found:

  • <footer> is hardcoded in the default template's layout.tmpl file. By hardcoded, I mean the element itself is not optional.

  • I've not seen any code in the default template's publish.js file that would somehow remove <footer> when processing layout.tmpl.

So to remove this footer you'd have to use a customized template or do some sort of post-processing on the files generated by jsdoc 3.

With versions prior to 3.3.0, removing <footer> from the template would mean copying the whole default template and making the change to layout.tmpl. Version 3.3.0, which is currently in alpha, will provide the possibility to basically tell jsdoc 3 to use the default template but with a different layout.tmpl file, which will make customizing templates much easier.

OTHER TIPS

I submitted a PR for this issue (https://github.com/jsdoc3/jsdoc/pull/916), and it's now on the 3.3.0 branch.

This change was not published to NPM at the time I'm writing this answer, but you can require the 3.3.0 branch from git:

"jsdoc": "git+https://git@github.com/jsdoc3/jsdoc.git#releases/3.3"

Afterwards, you can add the following field to your config file:

{
    ...
    "templates": {
        ...
        "default": {
            "includeDate": false
        }
    },
    ...
}

Notice this option is only available for the default jsdoc template.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top