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

Linking to anchors in the documentation #80

Closed
madx opened this issue Sep 14, 2015 · 2 comments
Closed

Linking to anchors in the documentation #80

madx opened this issue Sep 14, 2015 · 2 comments

Comments

@madx
Copy link

@madx madx commented Sep 14, 2015

I can't link to an anchor on the same documentation page. Here's and example of what I'm trying to achieve

/**
 * This is the documentation for my class.
 * 
 * [A link to another part of this documentation](#title)
 * 
 * [...]
 *
 * ## Title
 */
export default class Foo {}

The markdown parser correctly generates <h2 id="title">Title</h2> but the link to this anchor is made against the root of the documentation (<a href="/#title">).

Maybe there's an option for selecting the kind of links to generate? (Absolute or relative)

@madx
Copy link
Author

@madx madx commented Sep 14, 2015

I found that this is due to the <base> tag in the template. Do you think there is a way to remove it somehow?

@h13i32maru
Copy link
Member

@h13i32maru h13i32maru commented Sep 21, 2015

@madx Hi! Thanks for this issue. Sorry for late reply.
I fixed this problem in b1c9e67. You can use inner link:

# Inner Link
...
[foo](#inner-link)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.