Custom converter for Kramdown to create markup optimized for Facebook's Instant Articles.
More information on the why and how can be found in the blog post announcing this project.
The following things are handled differently compared to Kramdown's HTML converter. Not that some of these changes are relatively specific to Contentful's blog
On our Middleman based blog we use it with a small helper function.
require 'kramdown'
module FbiaHelper
def render_fbia_markdown(text)
html = Kramdown::Document.new(text.to_s, {:auto_ids => false, :html_to_native => true, :base_url => base_url}).to_fbia
return html
end
end
Examples on how the layouts invoking the function look like can be found in the example_layouts directory.
Copyright (c) 2016 Contentful GmbH. Code released under the MIT license. See LICENSE for further details.
This is a project created for demo purposes and not officially supported. Report problems via the issues page but please don't expect a prompt response.