ember-cli-addon-docs
ember-cli-addon-docs copied to clipboard
Better API doc linking
{@link} tag renders as plain text in API Reference documentation.
For example:
/**
* My Addon Function
*
* {@link https://ember-learn.github.io/ember-cli-addon-docs/}
*
* [ember-cli-addon-docs]{@link https://ember-learn.github.io/ember-cli-addon-docs/}
*
* {@link https://ember-learn.github.io/ember-cli-addon-docs/|ember-cli-addon-docs}
*
* {@link https://ember-learn.github.io/ember-cli-addon-docs/ ember-cli-addon-docs}
*
* @function myFunction
* @returns {Boolean} True.
*/
export default function myFunction() {
return true;
}
renders as:
myFunction(): boolean
My Addon Function
{@link https://ember-learn.github.io/ember-cli-addon-docs/}
[ember-cli-addon-docs]{@link https://ember-learn.github.io/ember-cli-addon-docs/}
{@link https://ember-learn.github.io/ember-cli-addon-docs/|ember-cli-addon-docs}
{@link https://ember-learn.github.io/ember-cli-addon-docs/ ember-cli-addon-docs}
I reference another project I borrowed code from and want to link back to it.
You should be able to link using markdown links, which I believe is a more flexible solution here
[text](url)
Talking to @dfreeman about this, we realized there are two edge cases to consider:
- Relative links to elsewhere in the docs. Currently they do work, but they cause a full page refresh which is not ideal.
- Linking types (particularly in type signatures), which would make traversing docs much easier
Will update this issue to match