Render output from markdown file inside .rst file

后端 未结 1 790
天命终不由人
天命终不由人 2020-12-20 14:52

I am using Sphinx for documenting a Python project and would like to have content from an existing .md file display inside of a .rst f

相关标签:
1条回答
  • 2020-12-20 15:41

    Try M2R sphinx extension.

    https://github.com/miyakogi/m2r#sphinx-integration

    After install m2r and change conf.py, just change .. include to .. mdinclude would work well.

    ml
    ==
    
    Tutorial
    --------
    .. mdinclude:: ../tutorial.md
    
    w2v
    ^^^
    
    .. automodule:: package.ml.w2v
    :members:
    
    0 讨论(0)
提交回复
热议问题