How to import a markdown file from github into loc

2019-09-12 08:44发布

问题:

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)