Skip to content

Commit

Permalink
Build with .md and .rst files
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Jan 28, 2019
1 parent 0d755d3 commit e8d01fc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/conf.py
Expand Up @@ -8,3 +8,15 @@

# Include all your settings here
html_theme = 'sphinx_rtd_theme'

# Sphinx < 1.3 supports only a string
# Sphinx < 1.8 supports a list of string
# Sphinx >= 1.8 supports a dictionary mapping
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
}

extensions += [
'recommonmark',
]
16 changes: 15 additions & 1 deletion docs/index.rst
@@ -1,4 +1,11 @@
.. include:: ../README.rst
multiple-source-suffix
======================

Use multiple values (as a dict) for ``source_suffix`` Sphinx configuration: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-source_suffix

Depending on the Sphinx version different options (str, list, dict) are supported. Read the Docs should be able to handle/accept all of them.

This build uses ``.md`` and ``.rst`` files to build its docs. Using ``recommonmark`` and ``restructuredtext``.

----

Expand All @@ -11,6 +18,13 @@ Sphinx configuration file to build this docs (:doc:`see full file <conf>`),

----

``requirements.txt`` file:

.. literalinclude:: ../requirements.txt
:linenos:

----

.. runblock:: pycon

>>> # Build at
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
@@ -1 +1,3 @@
sphinx-autorun

recommonmark==0.5.0

0 comments on commit e8d01fc

Please sign in to comment.