Can you import / link information from text files to a Markdown file?

I could not find an example for this, but is it possible to import the text by reference into a Markdown file? For example, let's say I have README.md. Can Markdown import from somefile.txtinto README, for example, using image links?

+3
source share
1 answer

Easy answer: No, Markdown does not support this.

A slightly more complicated answer: if you don't mind to manually concatenate files or write a simple assembly script, you can easily fake it. Consider the following simple example:

  • parts/ is a directory for storing your partial files.
    • 01-introduction.md contains your introduction to the title, title, etc.
    • 02-somefile.txt , 01-introduction.md.
    • 03-conclusion.md Markdown, outro, , .

Markdown. Unixy, - cat parts/* > final.md. Windows , type parts\* > final.md.

script, build.sh build.bat, , .

, Pandoc, Markdown ( ). , Markdown, HTML, PDF - .

+3

All Articles