How to properly use include-read #815
Unanswered
marin-jurjevic
asked this question in
Q&A
Replies: 1 comment 1 reply
-
After debugging this for couple of hours I found out that docutils never executes part of code for emiting Code responsible for this is located in Due to 'parser' option being set, code never reaches bottom lines which would call patched As I don't have full understand of the way parsing logic is implemented, I'm not sure if this should be corrected. I see two possible solutions:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a project where we have following structure
Inside getting_started/index.rst is following
We have README.md which is markdown + some raw html for aligning images etc. I want to keep this as is since all images and paths are properly set so it can be rendered in GitLab without errors.
The problem is that when sphinx processes README.md, all images have incorrect paths since they are relative in Markdown.
We've been using sphinx 5.3.0. I've tried enabling
app.connect("source-read", process_source_read)
to preprocess links and correct them by replacing path prefix. When I do this I only get raw RST (Markdown seems to not be processed yet).After that I found that sphinx 7.2.5 added
include-read
hook, which works the same way assource-read
.When I connect the
include-read
hook it doesn't execute.But, when I remove
:parser: myst_parser.sphinx_
the hook works and I get it to execute, but then README.md is processed as regular RST.My question is, why does
:parser: myst_parser.sphinx_
breakinclude-read
functionality and what's the best way to solve this. To sum up and avoid XY problem:What is the correct way to include existing README.md file without changing it so that it can get properly rendered on GitLab web interface and correctly processed by sphinx in resulting HTML documentation?
Beta Was this translation helpful? Give feedback.
All reactions