使用 RestructedText 和 Sphinx 包含预格式化文件

发布于 2024-08-25 03:55:10 字数 247 浏览 7 评论 0原文

我正在尝试使这个片段起作用:

Version History
---------------

These are the versions over time::

    .. include:: ../../CHANGES.txt 

也就是说,使用 include 指令,以便将文件作为块引用包含在内。一旦进入块引用,指令就会被引用。我想要将文件的内容放在块引用中。

知道如何做到这一点吗?

I'm trying to make this fragment work:

Version History
---------------

These are the versions over time::

    .. include:: ../../CHANGES.txt 

That is, use the include directive so that a file is included as a block quote. Once inside a block quote, the directive is quoted. I want the contents of the file in a block quote.

Any idea how to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

骷髅 2024-09-01 03:55:10

我认为 ..literalinclude:: 指令应该给你你想要的。

I think the .. literalinclude:: directive should give you what you want.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文