简体   繁体   English

将 html 从另一个文件嵌入到 markdown 文档中

[英]embed html from another file into a markdown document

If I have an html file somewhere in the same folder as a markdown document, is there any way to embed the entire file inside a markdown document, so that the html will be rendered correctly (not just the code displayed)? If I have an html file somewhere in the same folder as a markdown document, is there any way to embed the entire file inside a markdown document, so that the html will be rendered correctly (not just the code displayed)?

Markdown doesn't support includes out-of-the-box. Markdown 不支持开箱即用。 You need to use one of the existing flavors or static site generators that support markdown or/and HTML inclusions.您需要使用支持 markdown 或/和 HTML 包含的现有风格或 static 站点生成器之一。 For example, DocFX例如, DocFX

You can't include other Markdown files in Readme (Readme is usually Markdown file).您不能在自述文件中包含其他 Markdown 文件(自述文件通常是 Markdown 文件)。 You can use the "Quote" (See example below)您可以使用“报价”(参见下面的示例)

This is Quote这是报价

> This is Quote

You can see my Markdown guide here您可以在此处查看我的 Markdown 指南

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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