Sphinx Docs - Linking to Specific Section of Another Markdown Page

Viewed 400

Currently markdown links to other MD docs are working fine (and same with section links within the same document), e.g.:

doc1.md

# Doc 1

See [doc2](./doc2.md) [LINK WORKS] for more details.

doc2.md

# Doc 2

See [section 2](#section-2) [LINK WORKS]

# Section-2

<details>

Issue => Linking to section of another doc (in Sphinx Only)

Linking to a specific section of another doc isn't working, as the html is rendered with an anchor to /doc2.md#section-2 instead of /doc2.html#section-2, which results in a 404. This works fine in VS Code's MD preview, on Github, etc.

** Is this a known issue? If not, how can I fix this?**

doc1.md

# Doc 1

See [section2 of doc2](./doc2.md#section-2) [LINK DOESN'T WORK] for more details.

doc2.md

# Doc 2

See [section 2](#section-2) [LINK WORKS]

# Section-2

<details>

Specs

  • Conda Environment / Python3
  • Sphinx 3.4.3
  • recommonmark 0.7.1

Also, here's a Related Question, but different issue.

0 Answers
Related