Skip to content
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

Composable Decks #257

Closed
rawkode opened this issue Aug 29, 2020 · 5 comments
Closed

Composable Decks #257

rawkode opened this issue Aug 29, 2020 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@rawkode
Copy link

rawkode commented Aug 29, 2020

Hi,

Apologises if this is already possible and I've missed it, but I did look for examples first and couldn't find any.

I have a lot of common slides that I reuse across my presentations. I'd like to be able to use markdown, YAML, or JS to pick and order the slides I need in each.

Example, I would like to have common directory with my hello, about me, and goodbye slides.

Each talk would then have its own directory with specifics, and then I may have some topic based directories.

So each deck I'd like to provide a YAML list or JS array that states how to construct the deck.

deck = [
  common/hello.md
  common/about me.md
  deck/1.md
  deck/3.md
  deck/12.md
  kubernetes/what-is-it.md
  common/bye.md
];
@yhatt
Copy link
Member

yhatt commented Aug 29, 2020

You can see the most similar solution for your purpose in #227 and marp-team/marp-core#163. They are just using extended import syntax within Markdown powered by markdown-it-include, but may be enough to make the composed deck.

And there is a real-world Marp slide using composition with markdown-it-include too (from community).

Probably we would not make a framework-level support for the composable deck from multiple Markdowns because it looks like limited needs. Even so, Marpit framework can extend as you like by using exist compatible markdown-it plugin or writting Marpit plugin with your need.

@yhatt yhatt added the duplicate This issue or pull request already exists label Aug 29, 2020
@rawkode
Copy link
Author

rawkode commented Aug 29, 2020

Thank you, I'll take a look at the resources provided. Have a great weekend

@rawkode rawkode closed this as completed Aug 29, 2020
@ricardo-reis-1970
Copy link

ricardo-reis-1970 commented Sep 19, 2020

As a newbie enthusiast, I'm looking at several corners of Marp and, regarding markdown-it-include, it really doesn't strike me as a solution in the same footing as the remainder of Marp.

Not at all being shy to jump into Node after 20 lovely years of JavaScript, it really breaks my current flow of writing markdown and having it served directly from the docker image with -s .. Furthermore, if the solution is down to coding a composable markdown, it looks like we're diverging from Marp altogether.

Absolutely understanding that suggesting upgrades / new features is much easier than actually implementing them, I feel a bit intrigued by the absence of this basic include feature, whatever the demand for it might be -- which I really anticipate as high! -- as it seems so easy when compared to everything else Marp already does.

I would also like to have it as attempting to do a similar thing with CSS, through @import proved unsuccessful, leading to a lot of repetition and additional burden to maintain / improve / upgrade / rebrand any slide deck.

EDIT: @import is working.

@yhatt
Copy link
Member

yhatt commented Sep 20, 2020

Even if it looks like easy to implement, we would not work on the uncommon include feature because of our policies.

I have explained the fragmented reason every time when asked about a lacked feature, but I thought it's better to explain some backgrounds on this occasion.

  • And we think the original request in this issue does not have to implement into Marp newly, because it may be enough just to preprocess files by using any script (JavaScript, Python, Shell script, etc) before passing Markdown to Marp.

    Essentially Marp is Markdown processor, and the proposed syntax is looking like TOML rather than Markdown. So the composition process should not have to be Marp.

The plugin architecture for Marpit and Marp compatible with markdown-it has adopted to resolve them in user-side, and markdown-it-include is one of "really working" solution without breaking exist workflow of Marp tool.

@ricardo-reis-1970
Copy link

That is a very fair point, and I stand corrected. In fact, I'm doing some beautiful presentations already, enhancing Markdown with some HTML / CSS tricks and I guess that if I'm willing to walk that extra mile, your proposed mile is not that far after all.

We users are the worst, always complaining and asking for more. I really hope I will be able to give something back in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants