simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.04k stars 133 forks source link

Support for font-awesome #38

Open huangjj27 opened 6 years ago

huangjj27 commented 6 years ago

When I try to rewrite my latex resume with markdown, I think ti's a beautifiation to add some font-awesome icons in the resume, however I found the plugin not has the supportment. Is it a good idea add font-awesome support? If so, I'll take it in hand.

huangjj27 commented 6 years ago

a much more simple way to support font-awesome is to add it's cdn link style at the beginning of the markdown file.

simov commented 6 years ago

Can you show me a code snippet?

huangjj27 commented 6 years ago

I'm sorry to forget to give you the code.

here is my document:

<!-- my_resume.md -->
<!-- references to font-awesome cdn -->
<link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<!-- now we can use font-awesome -->
<i class="fa fa-envelope-o" aria-hidden="true"></i> <huangjj.27@qq.com> ·
<i class="fa fa-envelope-o" aria-hidden="true"></i> <349373001dc@gmail.com> ·
<i class="fa fa-qq" aria-hidden="true"></i> 349373001

what it looks like: default

that is, using the HTML-compatible feature of markdown, we can do this by ourself and hence we don't need to add any extra support in the render plugin. we just use the render compiler that work well and that's enough

Now I don't recommend to add such support in the plugin, unless you want to make it as a content option or something else. This may introduce some similar request like MathJax support.

simov commented 6 years ago

I see now, probably I more generic option would be better, I'll think about it. Thanks for the feedback.

huangjj27 commented 6 years ago

now you want to do this, maybe mathjax is another considerable support?

simov commented 6 years ago

I'm working on the MathJax support and in fact it's almost ready. You can subscribe to this repo using the Watch button at the top.