Format code blocks within bulletted lists with ReStructured Text (rst)
The trick is to use the double-colon (::) at the end of the text where you want to introduce the code block with a single colon, and then indent the code block four spaces while only indenting the regular text two spaces. Do this even though you want the non-code lines of text to visually appear at the same indent as the code block and the original introducing line of the bullet.
The following ReStructured Text (ReST) markup, typically put in a .rst file, for example:
Testing integration
-------------------
* Install the data site per README.rst; by default it has http://data.nichq.localhost/ for its local URL.
* Install the `community site <https://gitlab.com/nichq/nichq-community>`_ per its README.md; by default it has http://nichq-community.local for its local URL.
* If either of your sites has a different local URL, adjust the below accordingly.
* Edit the ``/etc/hosts`` of the data site virtual machine to add::
192.168.42.2 nichq-community.local
(check the IP address to use by running the command ``ping nichq-community.local`` on your host machine.)
* Edit the ``/vagrant/nichq_ilab/local_settings.py`` and set the following data in the "# OAuth2 Keys" section::
Will give you this:
Or as i wrote in my commit message: Nail the formatting for code blocks within bullet lists.
Comments
Post new comment