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

Add more examples #479

Closed
wooorm opened this issue Oct 15, 2020 · 4 comments
Closed

Add more examples #479

wooorm opened this issue Oct 15, 2020 · 4 comments
Labels
💪 phase/solved Post is done 🦋 type/enhancement This is great to have

Comments

@wooorm
Copy link
Member

wooorm commented Oct 15, 2020

Subject of the feature

remark has a giant ecosystem. This project is used a lot. It seems to be a good place to add common case examples of using math, footnotes, gfm, syntax highlighting, in the readme.

Problem

Confusing to newcomers. Most things can be solved by plugins. But it’s unclear how.

Expected behavior

A couple of examples. Not too many.

@wooorm wooorm added 🙉 open/needs-info This needs some more info 🦋 type/enhancement This is great to have labels Oct 15, 2020
@ChristianMurphy
Copy link
Member

Examples could help, another approach, taken in #428 but could also be applied to current is using Storybook to create interactive examples.

@wooorm
Copy link
Member Author

wooorm commented Oct 15, 2020

Could also work! I definitely don’t want it exhaustive!

Somewhere in between might be manageable in storybook.

Where’s the line? What should go where?

@ChristianMurphy
Copy link
Member

ChristianMurphy commented Oct 15, 2020

I think initially putting things in the readme is a good start.
I like storybook because it can also be used as a reference for questions/issues that involve plugins.

I definitely don’t want it exhaustive!

Likewise, usually 5-25 examples in a storybook can cover the vast majority of use cases.

Where’s the line? What should go where?

I usually would put a basic example in the readme, plus maybe one with an extension, and the rest would go in storybook.

@wooorm
Copy link
Member Author

wooorm commented Oct 16, 2020

I’m assuming GFM to be the most used plugin, so it can probably go in the main Use example. We can skip footnotes as it’s very similar.

Math is interesting because it means a syntax extension and handling nodes.

Syntax highlighting is interesting because you’re dealing with potentially 500kb of JS. And can go with the plugin or react-syntax-highlighter approach. #191

These seem enough for the readme?

wooorm added a commit that referenced this issue Oct 16, 2020
* Lowercase filenames to scream less
* Add `remark-cli`, `remark-preset-wooorm` to format prose
* Use imports and fancy new JS features
* Add link to a markdown cheatsheet, as many questions are about that
* Add details tags showing equivalent JSX for examples, to clarify how markdown
  works
* Refactor options list, clean signatures
* Add examples on plugins, plugins w/ options, renderers (syntax highlighting),
  and combining plugins w/ renderers (math)
* Add sections on why to use this, security, contributing, related projects
* Add test for `react-katex` integration

Closes GH-70.
Closes GH-191.
Related to GH-474.
Closes GH-479.
Closes GH-480.
Related to GH-483.
wooorm added a commit that referenced this issue Oct 17, 2020
* Lowercase filenames to scream less
* Add `remark-cli`, `remark-preset-wooorm` to format prose
* Use imports and fancy new JS features
* Add link to a markdown cheatsheet, as many questions are about that
* Add details tags showing equivalent JSX for examples, to clarify how markdown
  works
* Refactor options list, clean signatures
* Add examples on plugins, plugins w/ options, renderers (syntax highlighting),
  and combining plugins w/ renderers (math)
* Add sections on why to use this, security, contributing, related projects
* Add test for `react-katex` integration

Closes GH-70.
Closes GH-191.
Related to GH-474.
Closes GH-479.
Closes GH-480.
Related to GH-483.
@wooorm wooorm closed this as completed in b3aa6e0 Oct 17, 2020
@wooorm wooorm added ⛵️ status/released and removed 🙉 open/needs-info This needs some more info labels Oct 19, 2020
@wooorm wooorm added the 💪 phase/solved Post is done label Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 phase/solved Post is done 🦋 type/enhancement This is great to have
Development

No branches or pull requests

2 participants