为什么在使用 pathto(document) 辅助函数时不返回 URL?

Why is a URL not returned when using the pathto(document) helper function?

根据关于模板的 Sphinx 文档,pathto(document) return 是 Sphinx 文档的路径 URL。”根据定义,URL 通常包括方案、主机和路径组件。那么,为什么 pathto(root_doc) return index.html 而不是 https://example.com/index.htmlindex.html 不是一个URL。有人能启发我吗?在 Sphinx 中获取文档绝对 URL 的最佳方法是什么?

使用设置html_baseurl。如果不设置该值,则默认为 '',省略协议和主机。