ember-learn / ember-cli-addon-docs

Easy, beautiful docs for your OSS Ember addons
https://ember-learn.github.io/ember-cli-addon-docs
MIT License
176 stars 143 forks source link

Better API doc linking #198

Open scottwernervt opened 6 years ago

scottwernervt commented 6 years ago

{@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.

pzuraq commented 6 years ago

You should be able to link using markdown links, which I believe is a more flexible solution here

[text](url)

pzuraq commented 6 years ago

Talking to @dfreeman about this, we realized there are two edge cases to consider:

Will update this issue to match