Convert domain from rst to myst #794
-
I am currently converting the Trino docs from rst to myst with rst2myst. One thing I stumbled into now is a whole lot of The converter just wraps this all into eval-rst blocks and that is suboptimal and has a bunch of other issues I then run into. And related question .. the current setup is basically using the Python domain .. but thats technically wrong. Ideally it could be generic or otherwise a SQL domain .. but not such thing exists as far as I am aware. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Heya, you can use If your sphinx.domains.python.PyFunction: direct
sphinx.domains.python.PyVariable: direct
sphinx.domains.python.PyClasslike: direct
sphinx.domains.python.PyMethod: direct
sphinx.domains.python.PyClassMethod: direct
sphinx.domains.python.PyStaticMethod: direct
sphinx.domains.python.PyAttribute: direct
sphinx.domains.python.PyModule: direct Note, make sure to upgrade rst-to-myst to v0.4.0 |
Beta Was this translation helpful? Give feedback.
-
I ended up with this conf.yml
|
Beta Was this translation helpful? Give feedback.
Heya, you can use
rst2myst convert --default-domain py
to specify the default domain, which relates to https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-primary_domainIf your
function
relate to the Python domain, then you can userst2myst convert --conversions conv.yml test.rst
, whereconv.yml
looks like: