Comments (2)
I took a swing at this and it was really easy to re-use the same directive class from our rst-example
directive for a myst-example
directive. So, that is a first step. There are some MyST examples that can't be used with this though (eg. section headings and markup representing <hr>
elements).
My original vision was to feed a single directive multiple code-block
s with the language set, then render them in a set of tabs whose labels correspond to the code-block
's language. I was imagining something like
.. doc-example::
.. code-block:: rst
Some ``syntax``.
.. code-block:: md
Some `syntax`.
Alternatively, it would be more ideal to have rST content converted to MyST syntax and render both syntaxes as a set of tabs (whose labels correspond to the syntax name "rST" and "MyST") sharing a single rendered result. I think this would be better as a derivative of the rst-example
directive. I'm not sure if it should be done the other way around though (take MyST content and convert it to rST).
This will take me some time as the parser used by the state machine seems to be automatically determined based on the source file's suffix.
from sphinx-immaterial.
Damn. It looks like the rst2myst tool (still in beta) doesn't support the latest docutils.
I'll just submit a patch for what I have and put my original vision (a bit zealous even for me) on the back burner (again) till we have a feasible tool/lib to convert rST to MyST.
from sphinx-immaterial.
Related Issues (20)
- `@overload` expands common type unions HOT 5
- pydantic 2.5.0 release just broke this package HOT 6
- "Edit this page" on RTD HOT 9
- use libgit2 directly in merge script HOT 2
- Extra whitespace for rendered footnotes/citations HOT 10
- Rendering of :kbd: role is a bit off HOT 7
- document the `theme_result` extension
- Feature request: Mermaid js 10.x
- genindex / modindex seems broken HOT 1
- [jupiter-book] Missing Table of Contents HOT 2
- Google Fonts API key invalid? HOT 16
- "Copy to clipboard" and "Back to top" Buttons Disappear After Adjusting Theme Settings HOT 9
- Broken link to fontawesome/brands icons HOT 1
- implement blog plugin from upstream
- add role for custom hyperlinks HOT 1
- add extension for supplementing git stats about doc sources HOT 1
- add directive(s) to support grids
- sphinx~=7.3.0 breaks sphinx-immaterial HOT 11
- Language switch to currently opened page HOT 5
- Anchoring a content tab possible? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphinx-immaterial.