jaguarjs-jsdoc
jaguarjs-jsdoc copied to clipboard
Suppress tag-source element?
Is there a way to suppress the output of div.tag-source
?
I'm using jaguarjs-jsdoc via grunt-jsdoc
, and the tag source is showing the file path all the way down to the root of my OS, eg:
<div class="tag-source">/Volumes/VRMiniBackup/Backups/Web/Bitbucket/ob/wp-content/themes/sitename/resources/dev/scripts/sitename.js, line 2787</div>
This makes the div.tag-source
overlap the adjacent documentation at all but the widest viewport widths.
Thanks.
I got the same problem and I think it is a bug of jaguarjs-jsdoc. Attach my fix for your refer:
jaguarjs-jsdoc/publish.js: exports.publish = function(){...} line 404: sourceFilePaths.push(resolvedSourcePath); change to: if (sourceFilePaths.indexOf(resolvedSourcePath) === -1) { sourceFilePaths.push(resolvedSourcePath); }
Any update on this?
I had the same problem when generating documentation for one single file. In publish.js, the array 'sourceFilePaths' is used to collect all source references (path+filename). This array is later used to find and remove the common part. When generating doc for one .js source-file, this path+filename is always the same so the process of removing the path fails (as it includes the filename padded with a path separator). The simple fix I found is to remove the filename from the path+filename before populating 'sourceFilePaths'. Change 'jaguarjs-jsdoc-master/publish.js': sourceFilePaths.push(resolvedSourcePath); To: sourceFilePaths.push(path.dirname(resolvedSourcePath));
I had a similar desire. While waiting for an official fix, if you just want to hide the div.tag-source element you could do so with a grunt task:
grunt.registerTask('docsPostProcessing', function () {
var done = this.async();
require('fs').appendFile('./[YourDocsDestination]/styles/jaguar.css', '.tag-source { display: none; }', function (err) {
if (err) {
grunt.fail.fatal(err);
return;
}
done();
});
});
grunt.registerTask('docs', ['jsdoc', 'docsPostProcessing']);
Hi, I have the same issue.
It seems it was fixed in "jsdoc default template" : https://github.com/jsdoc3/jsdoc/issues/590 Could it be fixed here too ?
Thanks !