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

Markdown format nr. 3 #14

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

silvester-pari
Copy link
Collaborator

@silvester-pari silvester-pari commented Feb 20, 2024

Using the package from quarto did not work out in the end, so we can come up with our entirely custom syntax.

This third approach is a kind of "Mix" between the two older approaches. It relies on a markdown-it plugin (old, but still working) https://github.com/rstacruz/markdown-it-decorate.

By passing attributes inside HTML comments and some additional rules, it allows creating a completely "clean looking" md file when rendered by GitHub (check the rich diff of the added file), but at the same time allowing to create all needed configs for our storytelling needs (I hope).

If this is agreed upon, the proposed roadmap for upcoming implementation would be:

  • implement markdown-it-decorate (or any more up-to-date replacement, or own fork)
  • implement section rendering + nav rendering for external md files
  • implement eox-map section (tour mode) for external md files

This should give us some basic experience with which we can decide on how to continue (updating the editor, editor snippets, more sections etc.)

@silvester-pari silvester-pari changed the title Create markdown-format.md Markdown format #3 Feb 20, 2024
@silvester-pari silvester-pari changed the title Markdown format #3 Markdown format nr. 3 Feb 20, 2024
@silvester-pari silvester-pari marked this pull request as ready for review February 20, 2024 19:54
@srijitcoder
Copy link
Member

@silvester-pari This approach and markdown look better to me compared to the one you shared earlier.
We can start with the roadmap once everyone agrees with the approach and markdown.

@santilland
Copy link
Member

This proposal feels quite clean and understandable. One thing that could be considered strange is that h1(#) and h3(###) have "special" functions but h2 does. So i'm not sure about using h3 as step definition, it renders nicely in vanilla md, so i can't think of a better alternative.
So from my side also thumbs up

@silvester-pari
Copy link
Collaborator Author

silvester-pari commented Feb 21, 2024

Yes, that's a bit less ideal, the problem is that GitHub (and other renderers) renders h1 and h2 with an underline, but everything starting from h3 doesn't have one. I think this is also one reason that quarto uses h2 as sections, and h3 as sub-sections/steps. We can also do h1 + h2 and see how it looks like, I hope it is not too much effort to switch between h2/h3 in the parser.

@lubojr
Copy link
Member

lubojr commented Feb 21, 2024

I am also in favor of this approach. I can see this format being both manually editable and readable in GitHub in the best manner possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants