目前我在GitHub上的项目的README.md文件中使用此降价文本:
See the docs of [testthat][3] on how to write unit tests.
Links
-----
- http://www.rstudio.com/products/rpackages/devtools/
- https://github.com/hadley/testthat
- http://r-pkgs.had.co.nz/tests.html
---
[1]: http://www.rstudio.com/products/rpackages/devtools/
[2]: https://github.com/hadley/testthat
[3]: http://r-pkgs.had.co.nz/tests.html
Run Code Online (Sandbox Code Playgroud)
我不喜欢这种重复,但我不知道我有什么选择.如果我删除显式项目符号列表,那么GitHub将不会显示引用链接.如果我删除引用链接,那么GitHub会显示项目符号列表(当然),但上面的"testthat"之类的嵌入式链接不起作用.
有没有比复制更好的方法?我错过了什么?
灵感来自@ mb21,我想这是正确的方法:
See the docs of [testthat][2] on how to write unit tests.
Links
-----
- [RStudio Devtools][1]
- [testthat][2]
- [More unit test examples][3]
[1]: https://stackoverflow.com/users/214446/mb21
[2]: https://github.com/hadley/testthat
[3]: http://r-pkgs.had.co.nz/tests.html
Run Code Online (Sandbox Code Playgroud)
也就是说,逐字地包含链接并且没有有意义的标题是不好的做法.我应该只在底部的引用链接部分保留链接URL,并在项目符号列表中使用有意义的标题.
当你在GitHub上查看它时,URL应该不重要,如果你真的想知道你可以移动鼠标.当您以纯文本格式查看时,现在链接具有有意义的标题,这是有关URL的有用附加信息.
我会这样写:
See the docs of [testthat][1] on how to write unit tests.
Links
-----
- [RStudio Devtools](http://www.rstudio.com/products/rpackages/devtools/)
- [Testthat](https://github.com/hadley/testthat)
- [Tests][1]
[1]: http://r-pkgs.had.co.nz/tests.html
Run Code Online (Sandbox Code Playgroud)
那回答了你的问题吗?如果没有,则必须进行澄清。