import Immutable from "immutable" ; import fm from "front-matter" ; import direction from "direction" ; param { Page } page param { string } content return { Page } function parsePageFromString ( page , content ) { const parsed = fm ( content ) ; return page . merge ( { content : parsed . body , attributes : Immutable . fromJS ( parsed . attributes ) , dir : direction ( parsed . body ) , } ) ; } export default parsePageFromString ;