Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress tag-source element? #28

Open
dotherightthing opened this issue Oct 30, 2014 · 5 comments
Open

Suppress tag-source element? #28

dotherightthing opened this issue Oct 30, 2014 · 5 comments

Comments

@dotherightthing
Copy link

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.

@MultiThreadIsBad
Copy link

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);
}

@chiedo
Copy link

chiedo commented Jan 1, 2016

Any update on this?

@coolsp
Copy link

coolsp commented May 18, 2016

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));

@Hyddan
Copy link

Hyddan commented Aug 3, 2016

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']);

@jbelien
Copy link

jbelien commented Dec 20, 2016

Hi, I have the same issue.

It seems it was fixed in "jsdoc default template" : jsdoc/jsdoc#590
Could it be fixed here too ?

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@dotherightthing @jbelien @coolsp @chiedo @MultiThreadIsBad @Hyddan and others