How to import a markdown file from github into local gitbook

孤人 提交于 2019-12-25 09:16:57

问题


I try to import an .md file from a repo on github into my local gitbook.

I want to do something like this in my SUMMARY.md file:

# Summary

* [Introduction](README.md)

* [button-color](https://github.com/blah/button-color/blob/master/README.md)

In this case it becomes only a link.

How can I import the file?

I googled it but can't find any answer.

Is this even possible?

Help would be greatly appreciated.


回答1:


I found out how to do it.

I created a BUTTON-COLOR.md file.

In the file I needed this line:

{% include "git+https://github.com/blah/button-color.git/README.md" %}

In SUMMARY.md i Just added the reference to BUTTON-COLOR.md:

# Summary

* [Introduction](README.md)

* [button-color](BUTTON-COLOR.md)


来源:https://stackoverflow.com/questions/42248880/how-to-import-a-markdown-file-from-github-into-local-gitbook

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