Skip to content

Commit

Permalink
Koenig - Versioned renderer (#9606)
Browse files Browse the repository at this point in the history
refs TryGhost/Ghost#9505
- updates mobiledoc converter's `render` method to accept a `version` argument
    - `1` === Ghost 1.0's markdown-only renderer output
    - `2` === Koenig's full mobiledoc renderer output
- switch between mobiledoc renderer versions in Post model's `onSaving` hook
    - version 1 by default
    - version 2 if Koenig is enabled (currently behind dev experiments config + labs flag)
    - version 2 if the post's mobiledoc is not compatible with the markdown-only renderer
- "version 2" full-Koenig mobiledoc renderer output
    - wraps content in a `.kg-post` div
    - removes wrapper around markdown and html card output
    - adds classes to image card output including selected image size/style
- standardises es6 usage across mobiledoc related files
  • Loading branch information
kevinansfield committed Apr 8, 2020
1 parent f148bc0 commit bb65a72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/kg-default-atoms/lib/atoms/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
var softReturn = require('./soft-return');
'use strict';

const softReturn = require('./soft-return');

module.exports = [softReturn];
2 changes: 2 additions & 0 deletions packages/kg-default-atoms/lib/atoms/soft-return.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

module.exports = {
name: 'soft-return',
type: 'dom',
Expand Down

0 comments on commit bb65a72

Please sign in to comment.