Last active
March 22, 2016 16:13
-
-
Save sketchytech/8134a3a4089fcf592606 to your computer and use it in GitHub Desktop.
Apple News Format: Using Markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "1.1", | |
"identifier": "sketchyTech_Demo", | |
"title": "My First Article", | |
"language": "en", | |
"layout": {}, | |
"components": [ | |
{ | |
"role": "title", | |
"text": "My First Article", | |
"textStyle": "titleStyle" | |
}, | |
{ | |
"role": "body", | |
"format": "markdown", | |
"text": "This is just _over_ the minimum amount of JSON required to create a valid article in **Apple News Format**. If you were to delete the dictionary enclosing this text, you'd be there.", | |
"textStyle": "bodyStyle" | |
} | |
], | |
"componentTextStyles": { | |
"titleStyle": { | |
"textAlignment": "center", | |
"fontName": "HelveticaNeue-Bold", | |
"fontSize": 64, | |
"lineHeight": 74, | |
"textColor": "#000" | |
}, | |
"bodyStyle": { | |
"textAlignment": "left", | |
"fontName": "Georgia", | |
"fontSize": 18, | |
"lineHeight": 26, | |
"textColor": "#000" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Once you have the basic structure in place for your Apple News Format article, and the component text styles for your paragraph style formatting, you can then use either markdown or inline text styles for local formatting. To use markdown in any of your components simply add a format key with the value markdown.
Note: markdown is only applied to components that have a component text style and when you have markdown applied all inline text styles are ignored for that component.