是否有一种方法可以离线显示。md文件,这样我们就可以知道它上传到Github后会是什么样子?我指的是显示README。md文件,因为它将出现在Github,而不是作为编辑的目的。

需要在Mac和Windows上工作,因为我都用。


当前回答

从现在开始我使用http://marxi.co/。Marxi。Co有线上和线下版本。

其他回答

不久前我写了Grip,就是为了做到这一点。它渲染完全像它在GitHub上,并提供了几个额外的选项:

除了readme, Grip还可以渲染GitHub评论和问题 单击本地链接以呈现其他.md文件 在您自己的项目中使用的API 导出到HTML文件

使用pip安装:

pip install grip

然后进入包含README文件的目录并运行:

grip

传递-h以获得额外的帮助和选项。

这是Grip渲染的README截图:

点击这里查看。

你可以使用Firefox Markdown Viewer插件,它很容易安装和使用。

考虑捷联式。

Strapdown是基于javascript的解决方案,它在浏览器中呈现降价内容,这使得它非常适合脱机查看。 从他们自己的描述来看:

Strapdown.js使得创建优雅Markdown文档变得非常简单。不需要服务器端编译。

所以重命名你的。md markdown文件为。html,并围绕它:

<xmp theme="united" style="display:none;">
# Markdown content here
…
</xmp>
<script src="http://strapdownjs.com/v/0.2/strapdown.js"></script>

并且在任何浏览器中打开都会显示呈现的HTML。额外的好处:你可以很容易地改变主题。

在MacOSX上运行良好的最简单的资源之一是InkMark上的Markdown Quick Look插件。在OS X 10.9+上安装后,你只需在Finder中选择一个降价文件,然后点击空格键。我不确定结果是否与Github 100%相关,但他们是相当不错的,使一个微小的不显眼的离线查看者唯一的解决方案。Mashable也写了一篇关于78种不同工具的文章,如果你想要其他选择。

我发现MarkView谷歌Chrome扩展非常有用,实际上它的工作就像一个魅力:

MarkView is a Chrome extention for editing and viewing markdown file with an outline view, support multiple table format styles, code block syntax highlight and Github Flavored Markdown. Features: Editing and Viewing markdown file in web page style. Auto reload local file when file is changed (Post-installation: select "Allow access to file URLs" option in chrome://extensions/) Show outline beside the content in scrollable way Have buttons for GoTop, ViewSource and GoBottom Support Github Flavored Markdown table styles and code highlight. Highlight the code area for programming languages(eg. ```ruby) Support web pages printing with decent outlook(Chrome->File->Print...) Responsive: when the window size small than 940px, outline section will automatically hidden; resize bigger than 940px, outline section will display. MarkView will view all markdown files except those under raw.github.com because that subdomain only displays the source.

更多的功能已添加到MarkView:

所见即所得markdown编辑器 主题和代码样式选择 支持脚注1系 即时幻灯片演示 文档自定义样式 添加主题CSS并选择 添加代码样式并选择 编写CSS,保存并运行