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

Generate docs for components from mjml.io #9

Open
IanEdington opened this issue Sep 29, 2022 · 1 comment
Open

Generate docs for components from mjml.io #9

IanEdington opened this issue Sep 29, 2022 · 1 comment
Milestone

Comments

@IanEdington
Copy link
Contributor

Idea from @psugihara:

The biggest pain point I see with the package is documentation. My process is looking at mjml docs then kind of guessing on props or looking at the source code for each component. I think there’s a good argument for keeping mjml docs as the source of truth but I wonder if there’s some way of generating docs for the components or even adding.

@IanEdington IanEdington changed the title Generate documentation for the MJML components Generate documentation for MJML components from mjml.io Sep 29, 2022
@IanEdington IanEdington changed the title Generate documentation for MJML components from mjml.io Generate docs for components from mjml.io Sep 29, 2022
@IanEdington IanEdington added this to the v3 milestone Sep 30, 2022
@IanEdington IanEdington modified the milestones: v3, v4 Feb 21, 2023
@IanEdington
Copy link
Contributor Author

generated from this workflow: https://github.com/mjmlio/mjml/blob/master/.github/workflows/build-documentation.yml

Collects all the package readme.mds and concatenates them.

2 options I see

  1. Move the parsing work upstream by adding jsDocs to the components and writing a pre-processing step that generates the readme from the component documentation.
    • Benefit:
      • easier to manage documentation in mjmlio/mjml (adding a prop and updating docs happen at the same place)
      • less fragile than a script to read from the readme.md files
    • cons:
      • probably more work
      • requires upstream collaboration
  2. Parse the readme files to extract the prop values.
    • Pros:
      • relatively easy to get 80% completion
    • Cons:
      • most likely brittle
      • getting to 100% completion will be very difficult

@emmclaughlin (and other) any thoughts on these or other options you would propose?

@iRyusa I'd be interested in hearing your thoughts on this as the upstream library maintainer

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

No branches or pull requests

1 participant