Github include md files in README.md?

时光毁灭记忆、已成空白 提交于 2021-02-17 21:08:31

问题


Is there a way in Github to include md files in for example the README.md?

# Headline

Text

[include](File:load_another_md_file_here.md)

It should not link to the file, it should load the contents from it, like PHP include / file_get_contents.


回答1:


That does not seem to be possible, especially when considering github/markup#346 and github/markup#172.

No include directive is supported.




回答2:


This is not the correct answer but a workaround for others who really want this.

It's possible to use Gulp and Gulp Concat to merge the files into one before they are sent to Github..




回答3:


Ruby gem markdown_helper implements include files for GitHub flavored markdown (GFM).

Disclosure: I wrote the gem.




回答4:


Since it is not possible I just ended up placing a link as

[MY-LINK](../../SOME-OTHER-README.MD)


来源:https://stackoverflow.com/questions/35080160/github-include-md-files-in-readme-md

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!