-
Notifications
You must be signed in to change notification settings - Fork 34
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
New template #30
Comments
Glad to hear that. Nice work ! |
I really like the type definition links you added. Is there a reason you didn't link to types within the API too? (For example, linking from the MapEvent constructor to the Map type). That would really be a nice feature to have in docma. |
Closing this now. We can improve the template(s) more once we get v2 out. |
@mojavelinux Yes, there is a reason. I wanted to do it for non-web API types too but it's not that easy since links can be in different API pages. For example, the I could hardcode it quite easily but I wanted something could be reused by anyone so I decided to leave it as is for now. |
Thanks for the explanation. That helps me think about how I'm going to approach this problem. I think links between types is essential in an API, so I'm going to need to find a way to do it if I'm going to be able to use docma for my API docs. This really does seem like something docma should be able to track internally. |
I guess it should be possible to do that by poking into documentation global var but I had some timing constraints cc @onury. I'll have a look when I can find some free time. |
This should be a template feature, rather than docma builder core. Linking could be done via a custom Docma/Dust Filter. So (for the default template) in the <code class="symbol-type">{symbol|$type_linked}</code>
docma.addFilter('type_linked', function (symbol) {
// ...
}); I'll play with this in v2 branch, let you know. |
That's already what I am doing, the only problem was getting the correct api to link to. |
Alright. We can add a utility method to get link for a symbol in docma web-core. |
@mojavelinux It wasn't so hard after all: I added link to API objects in the documentation. I also did the same thing for returned types and for extend types. |
Just to let you know the documentation for AthenaJS is now using Docma with a new template (which is based on Docma's default template) and is available here :)
The text was updated successfully, but these errors were encountered: