-
Notifications
You must be signed in to change notification settings - Fork 16
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
[epic] MarkdownDB plugin system #2
Comments
Doing a bunch of research on remark and micromark re the parsing part of this - could remark be our plug in system here? (probably)
Can you pass "data" along the chain of a pluginThis example remarkjs/remark#251 talks about word counts but it console logs the info ...
|
The immediate question that arises is how the output of running plugins can be stored. Let's consider a straightforward example using a simple plugin available at https://github.com/florianeckerstorfer/remark-a11y-emoji. This plugin wraps emojis in a Assuming we successfully run the markdown files through such plugins, the next query is where the newly generated markdown should be stored. Currently, the library only generates SQL databases from metadata, lacking a method to load the content of a file. Possible solutions include:
|
@mohamedsalem401 we aren't using plugins to transform markdown at all - we are using plugins to extract information from the markdown and then store that somewhere ... See my last comment section about "Can you pass "data" along the chain of a plugin" ... because we just want to pass data along the chain. Or see the example above where it computes wordcount etc. To repeat: we are not using remark plugins to transform the content but rather to extract information from it ... |
We want a plugin system in MarkdownDB so people can easily extend the core functionality, for example to extract additional metadata, so that not all functionality has to be in core and people can rapidly add functionality
Sketch (April 2023)
https://link.excalidraw.com/l/9u8crB2ZmUo/9hkrQmVl9QX
Acceptance
Notes
MarkdownDB vs Contentlayer
Contentlayer supported:
description
auto-extracted from the document contentWhat we need:
The text was updated successfully, but these errors were encountered: