python-sphinx

Sphinx exclude one Page from html_sidebars

霸气de小男生 提交于 2021-01-28 09:51:08
问题 I am using Sphinx to build user docs for an application. According to the documentation for build configuration file there is an html_sidebars setting with an example documentaion. html_sidebars = { '**': ['globaltoc.html', 'sourcelink.html', 'searchbox.html'], 'using/windows': ['windowssidebar.html', 'searchbox.html'], } I am looking to have all pages display the sidebar except one, I have only been able to achieve the inverse of that, where the sidebar appears on just one page and not the

custom char for bulletlist sphinx

时间秒杀一切 提交于 2021-01-28 05:25:37
问题 There is someway to change the the default bullet 'disc'/'circle' on sphinx ? i tried something like the solution from https://groups.google.com/forum/#!topic/sphinx-users/fNWyyRzoa8I but it doesn't work for me, possibly because i'm not familiar with html and css syntax. _static/custom.css: ul.squarelist { list-style-type: square; margin-left: 0; padding-left: 0; } li.squarelist { padding-left: 1em; text-indent: -1em; } test.rst: .. cssclass:: squarelist * foo * bar output -> test.html: <ul

Don't Display Read the Docs Sphinx TOC in Narrow Windows

会有一股神秘感。 提交于 2021-01-28 05:06:47
问题 With a narrow window the full Read the Docs window displays content but when the window is widened a Table of Contents appears as a sidebar and the content is less than half the window width. How can the setting be changed so the window must be wider before the TOC is displayed? I expect this framework with a stylesheet, conf.py reference and custom layout would work with the appropriate css in the source/_static stylesheet. Changing: .wy-nav-content { max-width: 1200px !important; } I assume

Possible to define a target conditonally using `ifconfig` block (reStructuredText)

99封情书 提交于 2021-01-28 03:18:42
问题 Is it possible to condtionally define a target in a reStructuredText file using ifconfig? I've set a variable in my sphinx conf.py file that I want to use to conditionally determine the URI of a target in my documentation: def setup(app): argv = ' '.join(sys.argv) if '-b html' in argv: app.add_config_value('buildername', 'html', 'env') else: app.add_config_value('buildername', 'not-html', 'env') And my index.rst file has the following content: test link to target1_ .. ifconfig:: buildername =

Possible to define a target conditonally using `ifconfig` block (reStructuredText)

此生再无相见时 提交于 2021-01-28 01:41:33
问题 Is it possible to condtionally define a target in a reStructuredText file using ifconfig? I've set a variable in my sphinx conf.py file that I want to use to conditionally determine the URI of a target in my documentation: def setup(app): argv = ' '.join(sys.argv) if '-b html' in argv: app.add_config_value('buildername', 'html', 'env') else: app.add_config_value('buildername', 'not-html', 'env') And my index.rst file has the following content: test link to target1_ .. ifconfig:: buildername =

Automatic toctree update

三世轮回 提交于 2021-01-27 13:00:44
问题 I'm not sure if this is possible. But I'm hoping to put multiple .rst files in a directory, and during compilation. I want these files to automatically be inserted in the toctree . How can I go about this? 回答1: You can use the glob option which enables wildcards. Like this: .. toctree:: :glob: * This adds all other *.rst files in the same directory to the toctree. Reference: "Use “globbing” in toctree directives" 来源: https://stackoverflow.com/questions/28773398/automatic-toctree-update

Does sphinx run my code on executing 'make html'?

蹲街弑〆低调 提交于 2021-01-21 07:47:28
问题 I inherited a rather large codebase that I want to create HTML documentation for. Since it is written in Python I decided to use sphinx because the users of the code are accustomed to the design and functionality of the Python documention that's created with Sphinx. I used the command sphinx-apidoc to automatically create the rst-files. I imported the module path into sys.path so that Sphinx can find the code. So far so good. However, when I try to create the HTML using the command make html

Make HTML not working for Sphinx documentation in windows 10

别说谁变了你拦得住时间么 提交于 2021-01-20 12:53:42
问题 I'm trying to follow the tutorial about how to set sphinx and Readthedocs together for project. I used Sphinx back in the day while in a internship, with ubuntu and the setup was quite seamless. I've just launched the sphinx-quickstart on my anaconda power shell. When I try to run make html the following error appears: (base) PS D:\code\RaspberryServer\docs> make html make : The term 'make' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the

Make HTML not working for Sphinx documentation in windows 10

这一生的挚爱 提交于 2021-01-20 12:51:26
问题 I'm trying to follow the tutorial about how to set sphinx and Readthedocs together for project. I used Sphinx back in the day while in a internship, with ubuntu and the setup was quite seamless. I've just launched the sphinx-quickstart on my anaconda power shell. When I try to run make html the following error appears: (base) PS D:\code\RaspberryServer\docs> make html make : The term 'make' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the

ReadTheDocs build fails due to pathspec

北城余情 提交于 2021-01-07 02:39:35
问题 I'm trying to set up a sphinx documentation and put it online using ReadTheDocs, however following the steps of the tutorial I end up by having the following error pop in my build: Read the Docs build information Build id: 12647743 Project: documentationseries Version: latest Commit: None Date: 2020-12-28T11:42:02.102474Z State: finished Success: False [rtd-command-info] start-time: 2020-12-28T11:43:48.024647Z, end-time: 2020-12-28T11:43:48.412733Z, duration: 0, exit-code: 0 git clone --no