How to insert blank line using reStructuredText / Sphinx [duplicate]
Use the pipe vertical line key as shown below ==== John ==== | .. image:: _static/john.JPG :alt: John :height: 300px :width: 400px That should work.
Use the pipe vertical line key as shown below ==== John ==== | .. image:: _static/john.JPG :alt: John :height: 300px :width: 400px That should work.
You can reference a class like this: class B(object): “””docs for B with reference to :class:`.A`””” pass Sphinx will intelligently try and figure out what you’re referencing. If there are multiple classes with the name A, you might get a warning, but it should pick up the one in the current module.
Just add a blank line after the summary description of the method, before the description of the parameters: “”” Gtk.EventBox::button-release-event signal handler. :param widget: The clicked widget (The Gtk.EventBox). :param event: Gdk.EventButton object with information regarding the event. :param user_data: The Gtk.LinkButton that should be opened when the Gtk.EventBox is clicked. :return: None “”” Here … Read more
You could just use Read The Docs to host your documentation for you. They automatically handle multiple versions with a dropdown: https://docs.readthedocs.io/en/latest/index.html If you’d like to host your own documentation on GitHub Pages or some other web server, I made a Sphinx extension that does what you’re looking for: https://github.com/sphinx-contrib/sphinxcontrib-versioning
See the reStructuredText documentation. It can be done either with a named reference: Test hyperlink: SO_. .. _SO: https://stackoverflow.com/ Or with: Test hyperlink: `Stack Overflow home <SO>`_. .. _SO: https://stackoverflow.com/ Or with an embedded URI: Test hyperlink: `Stack Overflow home <https://stackoverflow.com/>`_.
reStructuredText supports implicit hyperlink targets. From the reStructuredText quick reference: Section titles, footnotes, and citations automatically generate hyperlink targets (the title text or footnote/citation label is used as the hyperlink name). So the following text (lifted from the reStructuredText quick reference, spelling mistakes and all): Titles are targets, too ======================= Implict references, like `Titles are … Read more
If you take a look at the contents of Makefile you’ll see something as follows: BUILDDIR = build … clean: -rm -rf $(BUILDDIR)/* This means that make clean just removes the build directory so, with regard to version control, ignoring the contents of the build directory should be enough as you already suspected.
You don’t need a custom theme. Use the built-in directive container that allows you to add custom css-classes to blocks and override the existsting theme to add some javascript to add the show/hide-functionality. This is _templates/page.html: {% extends “!page.html” %} {% block footer %} <script type=”text/javascript”> $(document).ready(function() { $(“.toggle > *”).hide(); $(“.toggle .header”).show(); $(“.toggle .header”).click(function() … Read more
.. code-block:: console is meant for interactive sessions. Bash or sh didn’t work for me. ( from http://build-me-the-docs-please.readthedocs.org/en/latest/Using_Sphinx/ShowingCodeExamplesInSphinx.html#pygments-lexers )
I came to this question via Google, so I’ll answer what helped me (not directly related to the question). I use importlib to dynamically import sub-packages given by a string. import importlib module_name=”subpackage.i.import” special_module = importlib.import_module(module_name, package=None) This simply has to be adjusted to import importlib module_name=”subpackage.i.import” special_module = importlib.import_module(module_name, package=”my_current_pkg”)