-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] The future plan of Marpit (delayed) #194
Comments
Skinny to skeletonThe most of v1 is made for Marp ecosystem. Surely it can use in the other frameworks, but it's like applying monkey patch and the real "pluggable" is far away. I tried to peel Marpit features one by one and I realised there are only 2 features as a core of our framework: Split out slides by The all of v2 features are available as extensions for our skeleton: CSS theming, image syntax, inline SVG mode, and more. They are going to keep as built-in features that can use from a new entrypoint such as For the other web slide libraries, Marp team and our community could provide Marpit engine for various frameworks by applying library-specific extensions to skeleton. e.g. |
The time to upgrade Marpit into v2 has come by #260, but unfortunately without discussions! 😭 As I mentioned in our blog, we are going to have to delay or reconsider exist plans. The new minimal requirements for Marpit v2 are following:
See also the milestone of modified v2. |
As a Hindi speaker I never made the connection because the way you pronounce both feels very different to me. |
Thank you for your feedback! I'm relieved to hear that. The main reason why I feel concerning about the project name is that sometimes there is bad experience during learning Marpit. By googling Marpit, uncomfortable images like group bashing often come into eyes unintentionally. Especially non Hindi speaker cannot recognize its reason so studying Marpit may become negative feelings to someone. |
Oh my, you're right. It comes from mar and pit which are two different words combined. A simple name change would be fine I suppose. |
Any update on name change? I was just thinking about it on the other day. |
There is still not specific progress. I think a changed name would become the name for a brand new framework because Marpit architecture is a bit of outdated. |
This is a RFC (Request for Comments) document for next major version of Marpit and the content may change.
Do you have interested in the future of Marpit? We always think listening opinions from Marp / Marpit community is the best rather than working with our dogmatic decision. We want your feedback for keeping to evolve Marp ecosystem! 💬
UPDATE: Following plans are delayed after v2.
Marpit has reached stable v1 in May 2019. And this is a roadmap to the next stable.
Marpit
v2in the future focuses to the enhancement as more universal framework for creating slide deck. We hope to make a basis of extensibility that is applicable not only to Marp ecosystem but also to other popular slide frameworks, reveal.js, WebSlides, and so on.Perhaps
v2the future version of Marpit would be full-rewritten, but most of features and syntax won't change unlike Marp -> Marp Next.Rename project
At first, we have to explain planning to rename project.
Marpit was a coined word named from Marp and "it" suffix, in honor of markdown-it library. However, we found that "marpit" has a violent meaning in Hindi.
Project name is important. We fear that some people are keeping a distance from our project just by the image of name. So we think Marpit should change the name into a word which remind no special meanings.
Moving to TypeScript (#136)
Marpit is an only project built on JavaScript (ECMAScript) in our mainstream projects. Marpit's type definition is defined in
/index.d.ts
but it's hard to maintain together with JS.Usefullness of TS has already proved in other projects. By moving to TS, developer experience will improve not only for Marpit but also for plugins.
Choose Markdown parser and make clear specification for plugin
For common Marp user, an internal parser is not too important. On the other hand, user that getting annoyed for lacked syntax in CommonMark have to consider using plugin to extend syntax.
Marpit aims to the extensible framework by plugins, and hopes to spread plugin ecosystem. However, unfortunately Marpit v1 plugin by community is hardly created and used yet.
We think currently the support for plugin author is very weak. For example, the specification document of Marpit tokens (AST) has not provided at the moment. In addition, we think restrictions by parser's architecture may make plugin development harder.
v2 will be the best timingif Marpit replaces a parser and specification into a promising.markdown-it
Currently Marpit v1 is using markdown-it as our base parser. It is working over the years, well-maintained, and easy to extend through plugins.
However, there are some restrictions that come from its architecture:
Nevertheless, using markdown-it parser continuously in Marpit v2 might be OK. Marpit v1's core implementations are very stable, tokens with plain structure are easy to extend, and not required cons shown in above anyway. If the specification is well-documented, it may have no problem for plugin author.
remark
remark (NOT Markdown presentation template) is a modern and popular parser without above restrictions. In fact, some tools that have same purpose of Marp are supporting remark.
VS Code's markdown engine is based on markdown-it. So Marp for VS Code might have to change the logic drastically if Marpit moved to remark.
MDX (Based on remark)
About MDX, we are taking a dim view because Marp requires only standard knowledges, such as Markdown, HTML, and CSS. However, actually it's popular in some tools so leaving extensibility for MDX makes a value.
Which is better?
That is the question to Marpit plugin author.
Both parsers have pros and cons. We want to hear an opinion from users interested to develop Marpit plugins.
Get rid of instance dependent parsing
Some internal plugins and classes are dependent on values defined in
Marpit
instance, such aslastGlobalDirectives
,lastComments
,lastStyles
etc...We should get rid of them and change to store values to the context object created within
render()
.Layer for Inline SVG mode
"Layer" is new concept available only in inline SVG mode, to make the layout system generalize.
Marpit v1 has advanced backgrounds to apply complex layout with keeping original DOM structure of Markdown (e.g. Multiple backgrounds, Split slides inspired from Deckset, etc...) They features are not changed in v2 too.
A current problem is too complex parse & build process of them. Leaving these logics may make it difficult to maintain.
As the discussion on #137 shows, the idea of layout using inline SVG is profitable. We have no plans to add that as the built-in feature at present, but we want to be making useful layouts become easy to create in plugin.
In
v2future, we will organize layout system for inline SVG as a new concept "Layer", and make easy to manipulate and extend through Marpit plugin.Concept
At first, let's review v1's inline SVG rendering.
# Hello, Marpit!
This Markdown will convert into like this:
When Markdown is using background image(s) through
![bg]()
, children of<svg>
element will have a huge change.Now you can see 3
<foreignObject>
elements: for background images, main contents, and pseudo-layer like pagination defined bysection::after
in theme CSS.They can define the position and size of content declaratively in DOM, so it becomes easy to control layout such as split slides.
In Marpit
v2for the future, we will treat each<foreignObject>
as "Layer" of a slide, and provide interface to add and modify layer contents, position, and stacking orders programatically. (A detailed interface is not defined yet)Contents layer
Each slide page must have the contents layer for placing original DOM converted from Markdown.
Plugin that provides additional layer will pick required elements from the contents layer, and append them to new layer. For example, advanced background plugin will pick
![bg]()
from the contents layer, and append to the background layer.Layers in regular conversion (v3?)
In addition, we also have an idea for layers in regular conversion by using nested
<section>
.We don't think that can realize immediately because it must consider manipulating theme CSS. But if it was realized, Marpit would grow extensibility to other framework, especially reveal.js. By using additional layer(s), Marpit can generate vertical slides for reveal.js.
Others
The text was updated successfully, but these errors were encountered: