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

Switch from marked to markdown-it markdown renderer #167

Merged
merged 5 commits into from
Sep 5, 2016

Conversation

gazpachoking
Copy link
Collaborator

@gazpachoking gazpachoking commented Jul 26, 2016

Had a few issues with the marked renderer, and decided to see how easy it would be to switch it out. markdown-it looks a bit more actively updated, flexible, and has nice extensions so I switched that in. I think it would also be nice if the renderer options/extensions could be specified from the realms config file, but I haven't tried anything like that yet.

It'd be lovely if someone tested this out on their wiki, I'm not sure how compatible it is with the current renderer. Also, I don't javascript very often, so I'm not sure I did that bit right either. Any comments are welcome.

TODO:

  • Restore anchors for linking to headings within a page.

These issues may relate:
#106
#117

@gazpachoking
Copy link
Collaborator Author

Running this on our prod site now (http://flexget.com), a couple small tweaks were needed to our markdown, but we are liking this engine better.

@gazpachoking
Copy link
Collaborator Author

So, I want to add back in the anchors to the headings, and this looks like a markdown-it extension that will do it https://www.npmjs.com/package/markdown-it-anchor it doesn't look like that package is on bower though. @scragg0x (or anyone who knows about javascripty stuff) is there a clean way to include this if I can't just add it to the bower requirements?

@scragg0x
Copy link
Owner

scragg0x commented Sep 2, 2016

@gazpachoking I usually use webpack/npm for new projects but realms is simple with no frontend build tools. You could get this file, https://wzrd.in/standalone/markdown-it-anchor@latest and toss it into realms and try it out.

@scragg0x
Copy link
Owner

scragg0x commented Sep 2, 2016

I got it from here btw: https://jsfiddle.net/9ukc8dy6/

@gazpachoking
Copy link
Collaborator Author

@scragg0x Thanks, that seems to work. I think that should be all of the old functionality restored now.

@scragg0x scragg0x merged commit c6db790 into scragg0x:master Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants