如何使用Shinx文档同时构建多个页面

How to build multiple pages in confluence using sphinx documentation(如何使用Shinx文档同时构建多个页面)
本文介绍了如何使用Shinx文档同时构建多个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在测试两个Python脚本ants s.py和interpolate.py。 两个脚本打印在同一页上。

如何在合流的两页中记录这两个脚本。

目前,两个脚本文档都保存在名为";Plants";的页面中。

index.rst文件:

.. spectRRa documentation master file, created by
   sphinx-quickstart on Fri Apr 24 11:55:57 2020.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.


Plants
******************************
.. toctree::
   :maxdepth: 2
   :caption: Contents:


plants
=================

.. automodule:: plants
         :members:

interpolate
******************
.. toctree::
      :maxdepth: 2
      :caption: Contents:

interpolate
=================

.. automodule:: interpolate
            :members:

conf.py:

# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.intersphinx',
    'sphinx.ext.ifconfig',
    'sphinx.ext.viewcode',
    'sphinx.ext.githubpages',
    'sphinxcontrib.confluencebuilder'
]

confluence_publish = True
confluence_space_name = 'DOCS'
confluence_server_url = '<>'
confluence_server_user = '<>'
confluence_server_pass = '<>'
#confluence_parent_page = 'Plants APIs'

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
    'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
    'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
    'preamble': '',
# Latex figure (float) alignment
    'figure_align': 'htbp',
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

推荐答案

我明白了,如何在合流中构建多个页面以及目录页。

index.rst的结构应在cd docs/Sources目录下,其中Assets、PLANT、SITE、PIPELINE是Python脚本的名称

数据-lang="js"数据-隐藏="假"数据-控制台="真"数据-巴贝尔="假">
.. spectRRa documentation master file, created by
   sphinx-quickstart on Fri Apr 24 11:55:57 2020.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

**API Docs**
***************
.. toctree::
   assets
   plants
   pipelines
   sites

还要在cd docs/Sources/目录中创建所有单独的rst文件。

Ex-对于assets.py脚本,assets.rst文件将位于下面。

数据-lang="js"数据-隐藏="假"数据-控制台="真"数据-巴贝尔="假">
.. spectRRa documentation master file, created by
 sphinx-quickstart on Fri Apr 24 11:55:57 2020.
 You can adapt this file completely to your liking, but it should at least
 contain the root `toctree` directive.

 .. toctree::
       :maxdepth: 2
       :caption: Contents:

**Assets**
=================

.. automodule:: assets
    :members:

注意-请不要更改缩进,否则将不起作用。

参考链接-Sphinx Documentation

这篇关于如何使用Shinx文档同时构建多个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Leetcode 234: Palindrome LinkedList(Leetcode 234:回文链接列表)
How do I read an Excel file directly from Dropbox#39;s API using pandas.read_excel()?(如何使用PANDAS.READ_EXCEL()直接从Dropbox的API读取Excel文件?)
subprocess.Popen tries to write to nonexistent pipe(子进程。打开尝试写入不存在的管道)
I want to realize Popen-code from Windows to Linux:(我想实现从Windows到Linux的POpen-code:)
Reading stdout from a subprocess in real time(实时读取子进程中的标准输出)
How to call type safely on a random file in Python?(如何在Python中安全地调用随机文件上的类型?)