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
Extra for generating link preview #488
Comments
I notice that extras are not implemented as separate modules, so this has to be incorporated into lib/markdown2.py. Does this look like a decent feature to justify the acceptance of a PR? |
Where do you see this preview information being stored? There's also pre and post process hooks in the codebase if you wanna import and then subclass the module, then add your own data as you see fit. Also check out https://github.com/michaelhelmick/lassie/ |
Thanks for pointing me to
will be converted to something like
|
Got it. Sounds interesting. But also very specific. Would probably be a worthwhile extra assuming it was built out to allow customization. Not sure if that's worth it for you to work on, but if it were to go down that path, it would probably be accepted. |
I am using markdown(my_text, extras= { ...}) so I essentially need a hook like def link_to_preview(link):
return html-based-on-lassie
markdown(my_text, extras={
'link_preview': {
'select': 'single-paragraph',
'processor': link_to_preview
}
} So that |
Instead of using a node.js based solution (e.g. link-preview-generator), I am wondering how I can generate link preview during the processing of markdown. There appears to modules (e.g. linkpreview) that perform the actual uplifting so maybe it is not too difficult to add an extra for this.
The text was updated successfully, but these errors were encountered: