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

Feature request: Plugin hook for embedded files to handle new types #615

Closed
dlip opened this issue Aug 28, 2018 · 7 comments
Closed

Feature request: Plugin hook for embedded files to handle new types #615

dlip opened this issue Aug 28, 2018 · 7 comments

Comments

@dlip
Copy link

dlip commented Aug 28, 2018

It would be great if plugins could add a hook to handle new embedded file types. Eg 'csv-to-table' could render a csv to a table.

[filename](mytable.csv ':include :type=csv-to-table')
@anikethsaha
Copy link
Member

anikethsaha commented Feb 3, 2020

You meant something like webpack loaders functionality?

PS

we need an additional method which will basically run on before_each hook in order to resolve or process :type=csv-to-table')
this method will take the source as an argument and then it's up to the method to how to process it.

These can be configured like this

...
process_files : [
{'csv-to-table' : csvToHTMLTable(source)} // should need to return html 
]
...

This is just an rough idea I am thinking. Lets discuss this. And I am adding this for 5.x . So I cant assure you whether it will be done anytime soon.

@anikethsaha anikethsaha added this to the 5.x milestone Feb 3, 2020
@anikethsaha
Copy link
Member

cc @docsifyjs/core @trusktr

@jthegedus
Copy link
Contributor

This seems like it could get out of hand fast and increase the scope of this project significantly. As a test, what are some other expected or previously requested source types?

@anikethsaha
Copy link
Member

This seems like it could get out of hand fast and increase the scope of this project significantly. As a test, what are some other expected or previously requested source types?

I was thinking like if we can move the logic of rendering to these. Like to render the sidebar, we can hve a _sidebar.md and that will be rendered using this..

Just a rough idea

@jthegedus
Copy link
Contributor

Like to render the sidebar, we can hve a _sidebar.md and that will be rendered using this..

That sounds reasonable enough to me 😄

@anikethsaha
Copy link
Member

Yeah, but we need PoC before to check that

@adriangb
Copy link

adriangb commented Aug 3, 2021

Any updates on this? I'd love to be able to store my tables as CSVs instead of ugly markdown tables.

@dlip dlip closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2022
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

6 participants