1

I use gitbook and markdown to write books. I have a markdown file which content will appear on many other markdown files. So if I can automatically include this markdown file into other markdown files, it will be very convenient.

But I can not find any solution from google. Can you give me some suggestion about it. Thanks very much.

Huayi Wei
  • 829
  • 1
  • 7
  • 16
  • 3
    gitbook specifically allows this via `{% include }` - see [this github issue](https://github.com/GitbookIO/gitbook/issues/226#issuecomment-200836837) from a few years back. – David Makogon Feb 26 '19 at 03:40
  • Since that issue GitBook [completely overhauled their product](https://docs.gitbook.com/v2-changes/important-differences) and I don't see any mention of `{% include %}` anymore. It might still work, but if it doesn't this is probably why. – ChrisGPT was on strike Feb 26 '19 at 13:34
  • 2
    My gitbook version is 3.2.3, and `{% include %}` can work well in my test. @David Makogon, you can put your comment into answer, and I will accept it. – Huayi Wei Feb 27 '19 at 02:37
  • See also https://stackoverflow.com/questions/4779582/markdown-and-including-multiple-files – Inigo Apr 26 '22 at 17:52

0 Answers0