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

Allow users to override the default template's layout file #480

Closed
hegemonic opened this issue Aug 22, 2013 · 3 comments
Closed

Allow users to override the default template's layout file #480

hegemonic opened this issue Aug 22, 2013 · 3 comments
Labels
Milestone

Comments

@hegemonic
Copy link
Contributor

In #472, @sporritt suggested that we allow users to override the layout.tmpl file in the default template. That makes it easy to control which CSS/JS files are pulled into each page, even if you don't want to fork the template.

Users should be able to specify another layout.tmpl file in the JSDoc config file. The key should be named something like templates.default.layout or templates.default.layoutFile. It should accept a relative path, to be resolved against...which directories exactly?

@sporritt
Copy link

for my specific use case it would suffice for it to resolve against the directory in which JSDoc is running, since I run JSDoc via Grunt on a build file in my project root. this is my first time using JSDoc, though - what other paths are significant and would make sense to add to the search path?

hegemonic added a commit that referenced this issue Dec 1, 2013
…emplates.default.layoutFile config property (#480)
@hegemonic
Copy link
Contributor Author

Fixed on master.

The config file can now contain a templates.default.layoutFile property, which specifies a relative or absolute path to a file that overrides the default template's layout.tmpl file.

Relative paths are resolved against the path to the config file; the current working directory; and the JSDoc directory, in that order.

@GloryWong
Copy link

Hi,
How can I control the CSS/JS files? I found that the CSS/JS files is permanently linked to defaults. It's not useful to add my CSS link to my customized tmpl

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

No branches or pull requests

3 participants