Github Md File



Можно ли вставлять gits в файл README.md, который находится в репозитории github?

Что-то вроде:

Обновление: мой ответ работает с страницами github, построенными через jekyll. Я использую теги сценария в методе уценки, который затем обрабатывается jekyll.

Поскольку markdown поддерживает html, можно просто использовать <script> для вставки gist.

When you create a new repository though GitHub, select “Initialize this repository with a README” unless you plan to import an existing repository. Your README.md file is now available for editing in your brand-new repository. Your project’s name is at the top, followed by any description you chose to include when creating the repository. Btw, wow, I created this gist in 2014 and only now became aware of the discussion and that it's the top Google hit for markdown comments github. 👍 This comment has been minimized. You just start writing Markdown text, save the file with the.md extension and then you can toggle the visualization of the editor between the code and the preview of the Markdown file; obviously, you can also open an existing Markdown file and start working with it. To switch between views, press Ctrl+Shift+V in the editor.

Просто скопируйте встроенный URL-адрес gist, предоставленный github

Github Md File To Pdf

.. и вставьте его в файл уценки.

Пример. Скопируйте приведенное ниже и вставьте в файл уценки.

<script src='https://gist.github.com/nisrulz/11c0d63428b108f10c83.js'></script>

Link

Github Md File Viewer

.. и это то, что вы получите

Нет, извините, это невозможно. Вам придется либо иметь ссылку на него в вашем README.md, либо скопировать его содержимое.

Github Md File

Github Flavored Markdown покажет вам, что вы можете поместить в свой файл README.md.

Вы можете сделать это, если используете препроцессор уценки, такой как Gitdown :

Затем в вашей уценке вы ссылаетесь на Gist с помощью JSON-крючка, например

Эта функция должна стать частью Gitdown в ближайшем будущем (есть открытая проблема, https://github.com/gajus/gitdown/issues/7 ).

Это работает в 2017 году при использовании страниц GitHub и темы Jekyll:

См. https://gist.github.com/benbalter/5555251 от @benbalter

Github Md File Syntax

Простой, как: {% gist 123456789 %}