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

Allow adding unified plugins to AST processing? #49

Closed
gitonthescene opened this issue Jun 8, 2020 · 1 comment
Closed

Allow adding unified plugins to AST processing? #49

gitonthescene opened this issue Jun 8, 2020 · 1 comment

Comments

@gitonthescene
Copy link

Hey there,

Thanks again for an awesome project.

Do you think it might be a good idea to allow overriding the AST parsers/transformers for configurability? If someone wanted to touch up the produced HTML they could simply add a transformer plugin to edit the resulting tree. I'm thinking something like this change.

I don't have strong opinions for how to configure use of plugins (where they should be placed, how they are fetched, etc.). I don't have a need for this, so this is more food for thought than anything else. Browsing through the other issues, I wonder if something like this might put the power in the end user's hands. The obvious downside is the potential for incompatibility.

Please let me know what you think.

Regards,
-Doug

@xiaoxinghu
Copy link
Collaborator

This is a good idea. The unifiedjs is so powerful because of the composable plugin system. We should take advantage of it. luckily we have plenty of examples to learn from (remark-toc, remark-react). We should create orga-toc for starters to take it for a spin. Will create a separate issue with more details in it.

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

No branches or pull requests

2 participants