Link doc entries to their definition in p5 source code. #1248
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
One of the hardest things about fixing a minor bug or typo is figuring out where it's located in a project's source code.
But one of the great things about YUIDoc is that it gives us that information in the
data.jsonblob it builds for our reference docs!So I thought that it might be nice to unintrusively link to the source code for a p5 API in its documentation. I stress the word unintrusively because I don't want to confuse the beginners who may be learning programming for the first time, and could be thrown off by the extra information.
Other benefits of linking to the source:
Here's what it looks like--the example screenshot below is taken from the documentation for
plane():The first link there is to view the source for
plane(), while the second is to edit it (yay to GitHub for providing permalinks to edit files at a specific line number!). My hope is that beginners who don't know anything about git can fix simple typos and issue PRs for them.Notes: