Skip to content

Instantly share code, notes, and snippets.

@hskang9
Forked from AleksejDix/Markdown jekyll hacks
Created June 10, 2017 19:23
Show Gist options
  • Save hskang9/60ae967250b68a55e5272e0f881ef104 to your computer and use it in GitHub Desktop.
Save hskang9/60ae967250b68a55e5272e0f881ef104 to your computer and use it in GitHub Desktop.
add figure element with figcaption to markdown
$( document ).ready(function() {
$('.markdown p img').unwrap().wrap('<figure></figure>').after(function() {
return '<figcaption>'+this.alt+'</figcaption>';
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment