简体   繁体   English

ReadTheDocs:将预构建的 HTML 页面发布到 ReadTheDocs

[英]ReadTheDocs: Publishing Pre-Built HTML Pages to ReadTheDocs

I was trying to create documentation from python doc strings, and found pdoc.我试图从 python 文档字符串创建文档,并找到了 pdoc。 If you don't know, it creates html documentation from python doc strings.如果您不知道,它会从 python 文档字符串创建 html 文档。 Since it generates .html files and not .rst , how do I publish those to ReadTheDocs or generate .rst files using pdoc?由于它生成.html文件而不是.rst ,我如何将这些文件发布到 ReadTheDocs 或使用 pdoc 生成.rst文件?

Quick sidenote: I don't want to use sphinx since 1) the theme pdoc has is pretty cool and 2) I don't know how to generate documentation from docstrings using sphinx (all the tutorials I looked at didn't help).快速旁注:我不想使用 sphinx,因为 1)pdoc 的主题非常酷,2)我不知道如何使用 sphinx 从文档字符串生成文档(我看过的所有教程都没有帮助)。

Read the Docs released a beta feature some time ago that allows you to completely override the build process. Read the Docs 前段时间发布了一个测试版功能,允许您完全覆盖构建过程。 This means that you can execute custom commands (eg pdoc ) and output all the HTML to a particular directory ( _readthedocs/html ).这意味着您可以执行自定义命令(例如pdoc )并将所有 HTML 输出到特定目录( _readthedocs/html )。 Once the build is finished, Read the Docs will publish the content of that directory.构建完成后,Read the Docs 将发布该目录的内容。

Check out the documentation at https://docs.readthedocs.io/en/stable/build-customization.html#override-the-build-processhttps://docs.readthedocs.io/en/stable/build-customization.html#override-the-build-process查看文档

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

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