Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github include md files in README.md?

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.

like image 834
Jens Törnell Avatar asked Jan 29 '16 08:01

Jens Törnell


People also ask

Can markdown include other files?

The long answer is yes. :-) Markdown was designed to allow people to write simple, readable text that could be easily converted to a simple HTML markup. It doesn't really do document layout.

How do I embed a file in markdown?

You can now attach files, including images, to markdown files while you're editing them in the web. This works just like file attachments in issues and pull requests and supports the same file types. Just drag and drag, click and select, or paste.


2 Answers

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

No include directive is supported.

like image 165
VonC Avatar answered Oct 11 '22 15:10

VonC


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..

like image 27
Jens Törnell Avatar answered Oct 11 '22 13:10

Jens Törnell