A little wrapper tool for migrating all HTML fields of posts to mobiledoc
npm install @tryghost/mg-html-mobiledoc --save
or
yarn add @tryghost/mg-html-mobiledoc
var mgHtmlMobiledoc = require('tryghost/mg-html-mobiledoc');
var convertedData = mgHtmlMobiledoc.convert(myData);
Data structure passed in can be either
var myData = {
logger: yourLoggingInstance,
posts: [
{
html: '<h2>Good stuff here</h2>'
}
]
}
or
var myData = {
logger: yourLoggingInstance,
data: {
posts: [
{
html: '<h2>Good stuff here</h2>'
}
]
}
}
This is a mono repository, managed with lerna.
Follow the instructions for the top-level repo.
-
git clone
this repo &cd
into it as usual - Run
yarn
to install top-level dependencies.
yarn dev
-
yarn lint
run just eslint -
yarn test
run lint and tests
Copyright (c) 2013-2023 Ghost Foundation - Released under the MIT license.