0

In DocFX, I have a block of content which i need to put on all (or most) markdown files. Is there a way to merge or pull the contents of another md file in to the current file? Basically i am trying not to repeat myself and looking for some sort of sharing mechanism.

James Poulose
  • 3,569
  • 2
  • 34
  • 39

1 Answers1

1

You can do this with file inclusion which is part of the DocFX flavored markdown (DFM).

DFM adds syntax to include other file parts into current file, the included file will also be considered as in DFM syntax.

bitbonk
  • 48,890
  • 37
  • 186
  • 278
  • Thank you very much! I almost started to write my own small merge tool for this. I do have a question though. In `[!include[](<filepath>)] `, i don't quite understand what the `title` is for. Where is that displayed?</filepath> – James Poulose Oct 28 '17 at 20:49
  • It is not displayed anywhere in the resulting site, but may be used in build-time messages – Paul Dempsey May 14 '20 at 22:08