-
Notifications
You must be signed in to change notification settings - Fork 47
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
Do not duplicate example code in README #53
Comments
I agree it's quite annoying to have to keep the two in-sync, and I'm not sure whether it's providing value to have them in two separate places. I think I was originally thinking it was nice to be able to run I am though reluctant to move the examples out of the documentation, though your point that the docs are getting pretty big is well taken. Another possibility is to remove the standalone examples and test the docs. Another possibility is to add a custom lint that checks that the two stay in sync. I don't particularly care about the maintenance burden as long if the duplication is worthwhile; though again I'm not sure if having the examples in two places is worthwhile. I'm not sure yet what I want to do about this. |
In that case, how about we only have these examples in the README. They are short enough to just copy-paste. Another idea is to generate the README maybe from a template with the help of a tool that reads content of examples/. |
README could include the example files, but GitHub markdown doesn't implement an |
It feels clumsy having to maintain copies of the same code (examples/ and README). Also, that README is rather large with all those examples. How about just linking to the examples?
The text was updated successfully, but these errors were encountered: