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

Can't use custom apidoc templates #5607

Closed
schmunk42 opened this issue Oct 16, 2014 · 5 comments
Closed

Can't use custom apidoc templates #5607

schmunk42 opened this issue Oct 16, 2014 · 5 comments
Assignees

Comments

@schmunk42
Copy link
Contributor

I tried to create a custom apidoc and guide renderer by extending the one from the bootstrap template.

But it looks to me like I can not get past these two lines, with a custom generator location:
https://github.com/yiisoft/yii2/blob/master/extensions/apidoc/commands/ApiController.php#L145
https://github.com/yiisoft/yii2/blob/master/extensions/apidoc/commands/GuideController.php#L96

Should be i.e. changed to params with absolute paths/NS, what do you think?

@cebe
Copy link
Member

cebe commented Oct 16, 2014

you can set up an alias for @yii/apidoc/templates/YourTemplateName to point to the directory where your template is located.

@cebe cebe added the type:docs Documentation label Oct 16, 2014
@cebe cebe self-assigned this Oct 16, 2014
@schmunk42
Copy link
Contributor Author

But where can I inject the alias? I am using vendor/bin/apidoc and there is no config in use.

@cebe
Copy link
Member

cebe commented Oct 17, 2014

Currently you can use the --appconfig option to set a specific config as described here: http://www.yiiframework.com/doc-2.0/guide-tutorial-console.html#configuration

Will try to make this easier.

@cebe cebe added this to the 2.0.1 milestone Oct 17, 2014
@schmunk42
Copy link
Contributor Author

Thanks for the info, I think I understand how I should work with it. As I want to just change the headline I'll focus on other things first.

@yii-bot
Copy link

yii-bot commented Jan 24, 2016

Issue moved to yiisoft/yii2-apidoc#48

@yii-bot yii-bot closed this as completed Jan 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants