Only last month I was talking about badges on the File Exchange. Today I'm going to tell you about another kind of badge: the GitHub badge.
For a few years now (since 2014), GitHub and the File Exchange have been on a first name basis. That is to say, you can put your MATLAB code into a repo on GitHub and then connect it to the File Exchange so that it can be found and downloaded from both places. Presto! Now you've got the best of both worlds. You have all the advantages of developing your code on GitHub, but also the market reach and depth of expertise available only on the File Exchange. MATLAB Central is where you'll encounter the people most likely to help you and the people most likely to benefit from your help. Both kinds of encounters are rewarding!
These days, when you play on GitHub, you really need to have badges. They're used to convey all kinds of information: affiliation, build status, code coverage, license type, and so on. So today we're rolling out a GitHub badge for the File Exchange. It looks nice, it's inexpensive (free, in fact!), and it gives you a standard way to point back to your code's entry on the File Exchange. Until now, it wasn't always obvious that a given file on GitHub also had an entry on the File Exchange.
Here's what the new badge looks like.
Of course, in practice it's a good deal smaller than that. This badge gets placed in your README.md file, and there it's visible to anyone who visits your GitHub page.
Let me show you how the process works. Suppose you have an entry on the File Exchange called Private Cody Leaderboard. As luck would have it, I happen to have just such an item myself. Now visit the detail page of your submission on the File Exchange. For me, that means going here:
At the top of the page (assuming your file is on GitHub) you'll see a note that says "Send more users to your File Exchange submission by adding this badge to your GitHub README.md." Click the "Copy Markdown" button in the author tools banner at the top. The badge markdown code will be copied to the clipboard. Then you just need to paste the copied markdown code into your GitHub README.md and you should be able to see the badge.
This is what it looks like when you're done.
That's it! You're done. Easy peasy.
要发表评论，请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。