Using MyST and trying to link from an .rst file to an .md file

243 views
Skip to first unread message

Bob DuCharme

unread,
Oct 6, 2022, 4:52:00 PM10/6/22
to sphinx-users
I have been using MyST to combine markdown files with Sphinx files, and so far it's going well, except that while trying to link from index.rst to file2.md I can't figure out what syntax to put in index.rst. 

Working from examples in the first tab in https://docs.readthedocs.io/en/stable/guides/cross-referencing-with-sphinx.html, I put a Myst target like the first two lines in that MyST tab into file2.md. Then in the index.rst file (that references file2.md in its toctree) I put a link like the last line on that rst tab in the example mentioned above, but the build doesn’t like the link. I tried many rst-ish and markdown-ish variations on that with no luck. Only  `Title of File2 Page <file2.html>`_ worked, which feels pretty kludgy. 

Any suggestions? 

Thanks,

Bob

Chris Sewell

unread,
Mar 1, 2023, 1:08:19 AM3/1/23
to sphinx-users
Heya, you should just be able to link via sphinx roles no? :doc:`file2` or a target within the myst doc :ref:`myref`
Reply all
Reply to author
Forward
Message has been deleted
0 new messages