简体   繁体   中英

Markdown include section from another file

I want to include just a section from another markdown file in our documentation base.

Our documentation is built in DocFx.

I'm able to include the whole file but I just want a section from the file. For example, this works [.include[title](file2.md)]

But it doesn't allow me to embed just a section if I use this [.include[title](file2.md#header2)]

My guess is it isn't supported but wanted to reach out in case someone knew something I didn't.

To include a specific section of a markdown file, I would use the xref cross-referencing syntax which supports the use of hashtag. See DocFX documentation here for an example.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM