Skip to content

chore(docs): add anchor links to documentation sub-sections#12386

Merged
perrygovier merged 2 commits into
masterfrom
doc-generation-subsections
Jul 18, 2017
Merged

chore(docs): add anchor links to documentation sub-sections#12386
perrygovier merged 2 commits into
masterfrom
doc-generation-subsections

Conversation

@samuelgoodell

Copy link
Copy Markdown

Short description of what this resolves:

This makes it possible to link to sub-sections of the markdown-generated API documentation on the website. In the past, users had to manually enter the hash in the URL if they wanted to do this.

Resolves ionic-team/ionic-site#1195, resolves ionic-team/ionic-site#689, resolves ionic-team/ionic-site#557

Changes proposed in this pull request:

  • When generating documentation, it adds HTML for the anchor link inside of an <h3> tag and surrounds the entire thing with newlines.

@perrygovier perrygovier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make the title itself clickable as well, but have the styles stay the same until hover? This may require a CSS change in ionic-team/ionic-site

@samuelgoodell

Copy link
Copy Markdown
Author

Making the title not clickable was intentional because that's how the other sections (e.g. Usage, Instance Members) behave. Should I change it for those as well?

@perrygovier

Copy link
Copy Markdown
Collaborator

Yeah, I think that's more the expected behavior these days.

@samuelgoodell samuelgoodell dismissed perrygovier’s stale review July 18, 2017 16:14

This was changed in the latest commit, with a related pull for a necessary style in ionic-site

@perrygovier perrygovier merged commit 961bfc3 into master Jul 18, 2017
@perrygovier perrygovier deleted the doc-generation-subsections branch July 18, 2017 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More linkable anchors for headlines docs: add the anchor icon to link to headers in API docs Automatically add anchor links to header tags

2 participants