apiaryio / api-blueprint

API Blueprint
https://apiblueprint.org
MIT License
8.65k stars 2.14k forks source link

Apiary Blueprint Docs: Unable to create clickable links between sections #233

Closed foxx closed 9 years ago

foxx commented 9 years ago

If I try and link to another section in the blueprint, it doesn't actually work. Upon checking the source code, I cannot see any <a> tags on the titles themselves, and clicking on the links results in a redirection to a broken page. It would be nice if we had the ability to link to sections.

Example

## Passwords

Some extra info about passwords

## Register user [PUT /users]

For more info about passwords, see [Passwords](#Passwords)
zdne commented 9 years ago

I wonder if this is related to https://github.com/apiaryio/api-blueprint/issues/212 ? note there is also a bug in parser that prohibits markdown reference-style links as documented here https://github.com/apiaryio/snowcrash/issues/55

pksunkara commented 9 years ago

I don't think apiaryio/snowcrash#55 have any bearing on this since the rendering in Apiary.io is done by robotskirt. I guess the problem here is that #Passwords will not be a valid link in Apiary documentation since Apiary has it's own reference links. We should explore and see what exactly the issue is.

zdne commented 9 years ago

Oh you are correct @pksunkara . I do not think an anchor for #Passwords (e.g <a name="Password">) is defined in the document. Please use full permalinks as generated by Apiary. e.g. http://docs.apiblueprintapi.apiary.io/#reference/api/service-root

zdne commented 9 years ago

So in your case #reference/Passwords could work.

pksunkara commented 9 years ago

@zdne That would work for Apiary documentation. But API Blueprint is also a markdown file where the #reference/Passwords would not work.

zdne commented 9 years ago

But API Blueprint is also a markdown file

I am afraid the least common denominator is HTML's <a name= since Markdown as such does not have any "standard" way of doing this and different vendors do this differently.