Unable to read Markdown files using Sphinx Autodoc

10 views
Skip to first unread message

Barry yap

unread,
Dec 4, 2020, 1:11:09 AM12/4/20
to sphinx-dev
Hi Guys,

New to Sphinx here, using it for an internal project.
The version of Sphinx I am currently using is version 3.3.1.
I could generate and view my HTML files locally with no problems.
The problem comes when I have some documentation in my markdown (.md) file and it does not show when I "open index.html" .

I have also followed the official instructions from Sphinx here regarding reading markdown files:

This is my directory structure:
my markdown files are all in "docs" folder
Screenshot 2020-12-04 at 1.57.09 PM.png
This is what I have done so far:

pip install Sphinx==3.2.1
pip install sphinx-rtd-theme==0.5.0
navigate into docs_sphinx folder and run sphinx-quickstart
sphinx-apidoc -o ./source ..
make html
cd build/html
open index.html

In my conf.py file, I included the paths to the modules

import os

import sys

basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))

sys.path.insert(0, basedir)

I also included the following extensions and source suffix:

extensions = [
    'sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx.ext.viewcode', 'recommonmark'
]

source_suffix = { '.rst': 'restructuredtext', '.txt': 'markdown', '.md': 'markdown', }

For themes:

html_theme = 'sphinx_rtd_theme'

In index.rst file, I also linked to my modules.rst using:


.. toctree::

   :maxdepth: 2

   :caption: Contents:


   modules

Could anyone point me in the right direction?

Thank you!


Best Regards,

Barry


Komiya Takeshi

unread,
Dec 6, 2020, 10:36:35 AM12/6/20
to sphin...@googlegroups.com
Hi,

This is a list for the development of sphinx and related tools. Please post a message to sphinx-users group. 

>This is my directory structure:
>my markdown files are all in "docs" folder

That's strange. All markdown files should also be placed under the same source directory. So it would be better to move them to docs_sphinx/source/

Thanks,
Takeshi KOMIYA

2020年12月4日(金) 15:11 Barry yap <yapweim...@gmail.com>:
--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sphinx-dev/d697ed77-911f-4753-9aaf-d5365db4af33n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages