]> granicus.if.org Git - esp-idf/commitdiff
docs : Add support for markdown files
authorAnuj Deshpande <anuj@espressif.com>
Thu, 11 Jan 2018 06:52:54 +0000 (14:52 +0800)
committerAnuj Deshpande <anuj@espressif.com>
Mon, 15 Jan 2018 05:58:31 +0000 (13:58 +0800)
docs/conf.py
docs/contribute/documenting-code.rst
docs/requirements.txt

index caa233c93c6fcbb1ff3a8649384700effa7e49be..aee4803d432a50f49a00c3064d34cd33564fd949 100644 (file)
@@ -70,7 +70,11 @@ breathe_default_project = "esp32-idf"
 templates_path = ['_templates']
 
 # The suffix of source filenames.
-source_suffix = '.rst'
+source_suffix = ['.rst', '.md']
+
+source_parsers = {
+       '.md': 'recommonmark.parser.CommonMarkParser',
+    }
 
 # The encoding of source files.
 #source_encoding = 'utf-8-sig'
@@ -111,7 +115,7 @@ print 'Version: {0}  Release: {1}'.format(version, release)
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
-exclude_patterns = ['_build']
+exclude_patterns = ['_build','README.md']
 
 # The reST default role (used for this markup: `text`) to use for all
 # documents.
index 228ff74b58e746f947d3c4cf9c3726c82f294b01..fa73f6032d32e7dff2860826c1cb1de03343cc43 100644 (file)
@@ -198,7 +198,7 @@ Once documentation is ready, follow instruction in :doc:`../api-reference/templa
 OK, but I am new to Sphinx!
 ---------------------------
 
-1. No worries. All the software you need is well documented. It is also open source and free. Start by checking `Sphinx <http://www.sphinx-doc.org/>`_ documentation. If you are not clear how to write using rst markup language, see `reStructuredText Primer <http://www.sphinx-doc.org/en/stable/rest.html>`_.
+1. No worries. All the software you need is well documented. It is also open source and free. Start by checking `Sphinx <http://www.sphinx-doc.org/>`_ documentation. If you are not clear how to write using rst markup language, see `reStructuredText Primer <http://www.sphinx-doc.org/en/stable/rest.html>`_. You can also use markdown (.md) files, and find out about more about the specific markdown syntax that we use on`Recommonmark parser's documentation page <https://recommonmark.readthedocs.io/en/latest/>`_.
 
 2. Check the source files of this documentation to understand what is behind of what you see now on the screen. Sources are maintained on GitHub in `espressif/esp-idf`_ repository in :idf:`docs` folder. You can go directly to the source file of this page by scrolling up and clicking the link in the top right corner. When on GitHub, see what's really inside, open source files by clicking ``Raw`` button.
 
@@ -221,6 +221,7 @@ You can setup environment to build documentation locally on your PC by installin
 3. Docment theme "sphinx_rtd_theme" - https://github.com/rtfd/sphinx_rtd_theme
 4. Breathe - https://github.com/michaeljones/breathe#breathe
 5. Blockdiag - http://blockdiag.com/en/index.html
+6. Recommonmark - https://github.com/rtfd/recommonmark
 
 The package "sphinx_rtd_theme" is added to have the same "look and feel" of `ESP32 Programming Guide <https://esp-idf.readthedocs.io/en/latest/index.html>`_ documentation like on the "Read the Docs" hosting site.
 
index 8aaf322a9fa0807b4d9f620747a1bf94edad323a..b85fc09a173b0e83936c80dec87b49f71cd3cf10 100644 (file)
@@ -7,4 +7,5 @@ breathe==4.7.3
 sphinxcontrib.blockdiag==1.5.3
 sphinxcontrib.seqdiag==0.8.5
 sphinxcontrib.actdiag==0.8.5
-sphinxcontrib.nwdiag==0.9.5
\ No newline at end of file
+sphinxcontrib.nwdiag==0.9.5
+recommonmark