Skip to content

Instantly share code, notes, and snippets.

@tzmartin
Created September 3, 2016 06:43
Show Gist options
  • Select an option

  • Save tzmartin/41e2a3f62c111c3745980aad34cbc721 to your computer and use it in GitHub Desktop.

Select an option

Save tzmartin/41e2a3f62c111c3745980aad34cbc721 to your computer and use it in GitHub Desktop.
Pony render snippet

Pony Render Example

This is deprecated in favor of Remark implementation. Posted here for posterity.

Tokenizer Example

let tokens = Pony.getTokens(str)
console.log(JSON.stringify(tokens))

HTML Render

  • VFile contents
  • Custom theme
  • Proxified URLs with rewrites
let html = Pony.render(global.currentFile.contents, {
  theme: global.userSettings.render.slide.theme,
  proxyPass: true,
  root: resolve(global.currentFile.dirname),
  rewriteUrl: 'http://127.0.0.1:' + global.userSettings.render.port + '/asset/?p='
})
console.log(html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment