如何查看Github上Markdown文件的来源? [英] How do I view the source of Markdown files on Github?

查看:298
本文介绍了如何查看Github上Markdown文件的来源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当在github.com上查看时,Github有助于将Markdown( .md )文件呈现为HTML格式(例如, README.md )。

查看任何其他源文件时,它会显示为未呈现的源代码(例如,的.gitignore )。一个便利的功能是通过点击行号直接链接到源代码行(例如,像这样)。



如何查看Github上的Markdown文件的无源代码(这样我可以链接到特定在线来源)?



记录:我知道原始按钮,但它不提供任何很好的UI Github。

使用Raw按钮。例如,如果您正在查看 README.md 导航中有一个Raw按钮。这可以是简单的URL变化(从BLOB到生的),但在这种情况下变得一单独的链接。



编辑:Markdown源代码没有漂亮的视图。有转换的HTML视图,没有UI的Raw视图和Blame视图。编辑2:另一种选择是在README.md中使用Anchors。只有Blame视图为您提供了链接到源代码中特定行的功能。

例如,如果您采用安装标题,则可以直接链接在Markdown文件的内容中。假设你在Markdown本身没有隐藏任何东西,这更接近于解决你原来的问题。


Github helpfully renders Markdown (.md) files to HTML when viewing on github.com (for example, this README.md).

When viewing any other source file, it is shown as unrendered source code (for example, this .gitignore). A handy feature this gives is linking directly to a line in the source by clicking the line number (for example, like this).

How can I view the unrendered source of Markdown files on Github (so I can link to a particular line in the source)?

note: I know of the "Raw" button, however it does not provide any of the nice UI Github has.

解决方案

Use the "Raw" button. For instance, if you were looking at README.md there is a Raw button in the Navigation. This can be simple URL change (from blob to raw), but in this case becomes a separate link.

Edit: There is no "pretty" view for the Markdown source. There's the converted HTML view, the Raw view without the UI, and the Blame view. Only the Blame view provides you with the ability to link to a specific line within the source.

Edit 2: The other option is to use Anchors within the README.md. If you take the Installation title for example, you can directly link within the content of the Markdown file. Assuming you don't have anything hidden within the Markdown itself, this is closer still to solving your original question.

这篇关于如何查看Github上Markdown文件的来源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆