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

Using in Browser #15

Open
Ratstail91 opened this issue Mar 27, 2017 · 3 comments
Open

Using in Browser #15

Ratstail91 opened this issue Mar 27, 2017 · 3 comments
Labels

Comments

@Ratstail91
Copy link

Hi, I was really hoping to use this in the browser. Is there any way it can be adapted for that? I'm already using several other markdown plugins client-side, so I hoped this would simply work.

@sethen
Copy link
Owner

sethen commented Mar 27, 2017

Hello,

Can you give me an example of how you would like to see this used in the browser? I am having a tough time coming up with a use case (mainly because I have never really thought about it).

@Ratstail91
Copy link
Author

Lets say I have the following markdown file:

#include 'header.md'
#include 'games.md'
#include 'footer.md'

This file is fetched and parsed client-side, using markdown-it. Each time it hit an #include, a markdown-it plugin would make an async request for that file, and inserts it there before it finishes. This way I could have the contents of header.md and footer.md on several different pages.

I know this isn't designed for that, I just originally misinterpreted it that way. It would be cool if this could be adapted like that, though.

@sethen
Copy link
Owner

sethen commented Apr 26, 2017

Yes, that's an interesting use case. Currently this is only for server side but it could be adapted at some point for client side. It would just need to be abstracted away a little bit to work as such. I will leave this open.

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

No branches or pull requests

2 participants