-
Notifications
You must be signed in to change notification settings - Fork 701
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
Recommend best practices for package README.md files #2851
Comments
Maybe we can collect guidance in this comment. Here's a start. Dart-specific guidance for READMEs:
General guidance for READMEs (not Dart-specific):
|
Additional guidance (totally optional):
We might consider writing a short article on pub.dev/ about this? Because then we can link to it from the README, and we can add visual aids: Some resources:
|
I'd also suggest authors to:
+1 to writing a short article on pub.dev! The article may include recent UX research insights on how Flutter/Dart users search for packages on pub.dev and consume README files there. I'd also like to add tips like:
|
@jayoung-lee said:
This sounds more detailed than I'm used to seeing in a README. Can you point me to an example of this? (Maybe the package API tends to reuse the same parameters in multiple places?) |
Then it's probably because some packages visited during the recent user study were simpler than others? Participants visited few pages that listed parameters, attributes, or properties, and they found it useful when deciding whether to test the package or not. |
I took a quick look at those package pages plus the other places where their README.md is used. There are some issues with sharing the content, although not as many as I expected. Mostly the issues are with dartdoc rendering differently or not finding images because they had relative URLs. Interestingly, relative images worked on pub.dev/packages pages.
|
To be clear... I believe that of the 3 README usages, the package page is most important. It's good that if the README works in the repo, it seems highly likely to work as a package page. I'm curious how many people look at the API docs on pub.dev. |
I agree that the package page is most important! It seems like very small number of pub.dev visitors (~5% of pageviews) open API docs ( |
That's very good information to have! It's especially telling since there's only one URL for each package under |
We now have a great article covering this with #3147 which can be found at https://dart.dev/guides/libraries/writing-package-pages. Thanks for the amazing work on this article, it's a great resource! Closing this for now. If there are any other additions you'd like to see, we can discuss them in a targeted, follow-up issue. |
Related: dart-archive/stagehand#683
Package READMEs often serve triple duty, as API homepages, pub.dev homepages, and repo homepages. For example, consider, the README for the shelf package (https://github.com/dart-lang/shelf/blob/master/README.md), which is rendered in the following places:
If you have examples of good READMEs (preferably with examples of WHY they're good, and HOW they could be even better) and issues related to READMEs, please comment on this issue.
https://github.com/thegooddocsproject/templates might be interested in what we come up with.
/cc @jayoung-lee
The text was updated successfully, but these errors were encountered: