我正在为我的github项目写一个自述文件。md格式。有什么方法可以测试我的自述。Md文件在提交到github之前会是什么样子?
当前回答
你可以使用静态网站编辑器:在GitLab 13.0(2020年5月)中,它附带了一个所见即所得面板。
WYSIWYG for the Static Site Editor Markdown is a powerful and efficient syntax for authoring web content, but even seasoned authors of Markdown content can struggle to remember some of the less-frequently used formatting options or write even moderately-complex tables from scratch. There are some jobs better accomplished with a rich text, “What You See Is What You Get” (WYSIWYG) editor. GitLab 13.0 brings a WYSIWYG Markdown authoring experience to the Static Site Editor with formatting options for common formatting options like headers, bold, italics, links, lists, blockquotes, and code blocks. The WYSIWYG editor also removes the onerous task of editing tables in Markdown by letting you visually edit table rows, columns and cells in the same way you would edit a spreadsheet. For those more comfortable writing in raw Markdown, there’s even a tab for switching between WYSIWYG and plain text editing modes.
请参阅文档和版本。
同样,您只能使用它来编写README:一旦它看起来很好,您就可以将它报告给原始项目。 但重点是:你不需要任何第三方降价预览插件。
GitLab 14.2(2021年8月)
Preview Markdown live while editing Markdown is a fast and intuitive syntax for writing rich web content. Until it isn’t. Luckily, it’s easy to preview the rendered output of Markdown to ensure the accuracy of your markup from the Preview tab. Unfortunately, the context switch required to move between the raw source code and the preview can be tedious and disruptive to your flow. Now, in both the Web IDE and single file editor, Markdown files have a new live preview option available. Right-click the editor and select Preview Markdown or use Command/Control + Shift + P to toggle a split-screen live preview of your Markdown content. The preview refreshes as you type, so you can be confident that your markup is valid and will render as you intended. See Documentation and Epic.
参见GitLab 14.6(2021年12月)
Toggle wiki editors seamlessly Toggle wiki editors seamlessly Editing wiki pages with the new rich Markdown editor makes it easier for everyone to contribute regardless of how well they know Markdown syntax. You may also prefer to write raw Markdown in some situations, but use the WYSIWYG interface for more complex or tedious formatting tasks, like creating tables. Previous versions of GitLab required you to save changes before switching between the rich Markdown editor and the Markdown source, adding more steps and friction to your edits. In GitLab 14.6 you can now seamlessly switch between the two editing experiences without committing your changes, choosing the editor that suits your needs at any given moment. See Documentation and Issue.
参见GitLab 15.6(2022年11月)
Default split view for Markdown preview in the Web Editor The ability to preview Markdown files side by side while editing was introduced in GitLab 14.2. With this release, we’ve made the split view the default experience for previewing Markdown in the Web Editor. In the Preview tab, you can now see a live Markdown preview that updates as you type alongside your content. This way, you can be confident that your markup is valid and renders as you intended without having to switch between the Write and Preview tabs. See Documentation and Issue.
其他回答
这是一个相当老的问题,但由于我是在网上搜索时偶然发现的,也许我的答案对其他人有用。 我刚刚发现了一个非常有用的CLI工具来渲染GitHub风味markdown: grip。它使用GitHub的API,因此渲染得很好。
坦率地说,《grip》的开发者对这些类似的问题有更详细的回答:
是否有一个命令行实用程序渲染github风味markdown? 编辑GitHub的Readme.md的最好方法是什么?
你可以安装chrome扩展“Markdown Viewer”: https://chrome.google.com/webstore/detail/markdown-viewer/ckkdlimhmcjmikdlpkmbgfkaikojcbjk?hl=en
这个已经被证明是可靠的:http://tmpvar.com/markdown.html
我只是创建了一个“功能”分支,并将其推送到github,在那里我做出了改变,这变得可见,他们将如何在github中看起来。
然后,当我满意的时候,我就把base调回main,或者对main执行一个pull请求,不管你碰巧在使用哪个进程。
使用git时,很少需要在本地进行测试,除非您的存储库位于公司防火墙后面,或者需要离线工作。
在这种情况下,Atom和VScode都有不错的Markdown渲染器,不足以在github上显示你的更改,但足以看到你的更改是否朝着正确的方向发展。
Visual Studio Code具有编辑和预览md文件更改的选项。因为VS Code是独立于平台的,所以这适用于Windows、Mac和Linux。
要在视图之间切换,请在编辑器中按Ctrl+Shift+V。您可以与正在编辑的文件并排查看预览(Ctrl+K V),并在编辑时查看实时反映的更改。
也……
问:VS Code是否支持GitHub调味Markdown? 答:不,VS Code使用Markdown -it库来实现CommonMark Markdown规范。GitHub正在向CommonMark规范迈进。
预览按钮如下:
详情请点击这里
推荐文章
- Git:在推送后删除提交的文件
- 在GitHub中编辑git提交消息
- Github:导入上游分支到fork
- GitHub上的分叉和克隆有什么区别?
- 如何将现有的解决方案从Visual Studio 2013添加到GitHub
- 是否可以在GitHub上搜索特定的文件名?
- 如何将LaTeX与Markdown混合?
- GitHub -未能连接到GitHub 443 windows/连接到GitHub失败-无错误
- 我怎么能让詹金斯CI与Git触发器推到主人?
- 如何从拉请求中删除提交
- 如何用分发文件发布npm包?
- 如何同步项目到GitHub与Android工作室?
- 跟踪在GitHub上创建的一个新的远程分支
- 如何将一个特定的提交从一个分支合并到Git中的另一个分支?
- 从pull请求中删除一个修改过的文件