{ "feedback_email": "Example Support ", "feedback_twitter": "@example_support", "entries": [ { "title": "Sections", "detail": "Sections will not be displayed if they don't have at least one valid article defined (see below), but section titles and detail text are optional.", "articles": [ { "key": "section-title", "title": "Title", "body": "A section's title may be a string of any length. These are displayed to the user in the article list, at the top of the section itself.", "related_articles": ["detail", "articles"] }, { "key": "detail", "title": "Detail", "body": "A section's detail string may be a string of any length. These are displayed to the user in the article list, at the bottom of the section itself.", "related_articles": ["section-title", "articles"] }, { "key": "articles", "title": "Articles", "body": "Sections are groups of articles, which are defined as part of the section itself within the JSON as an array of dictionary values. They are displayed to the user as rows within the article list (which just display the title), and can be opened to show more information (by way of the body text), as well as related articles.", "related_articles": ["detail", "section-title"] } ] }, { "title": "Articles", "detail": "For articles to be considered valid, they must contain both a title and body value. If these are not present, the article will be ignored. All other properties are optional.", "articles": [ { "key": "key", "title": "Keys", "body": "Keys are used to deep-link to articles with SherpaViewController, and to identify related articles. They may be strings of any length. Empty, null, or invalid values (such as numbers) will result in no key being applied to the article.\n\nThis article has a key of \"key\", but any string value should result in a key that can be used to identify the article.", "related_articles": ["article-title", "body", "minimum-build", "maximum-build", "related-articles"] }, { "key": "article-title", "title": "Titles", "body": "An article's title may be a string of any length. These are displayed to the user in the article list, at the top of the article itself, and are used to match against queries when the user searches for a specific term.", "related_articles": ["key", "body", "minimum-build", "maximum-build", "related-articles"] }, { "key": "body", "title": "Body Content", "body": "\n

The body of an article may be a string of any length, and can contain HTML markup, including images and videos.

A picture of a cat from Unsplash.
\n

The src attribute is converted to data-src for image to allow for a simplified form of lazy loading, which assists with initial loading times.

\n

Links within the text are opened in a Safari View Controller (on iOS 11 and later), and otherwise are passed off to Safari itself, via openURL(_:).

\n

Heading 2

\n

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt quam ante, eu gravida dui volutpat nec. Integer ipsum augue, lobortis ac pellentesque a, blandit sit amet orci. Donec porta nibh eget arcu lacinia, finibus iaculis elit eleifend.

\n\n

Vestibulum quis mi eget elit molestie ullamcorper consequat id nunc. Ut maximus lorem quis ligula auctor dapibus.

Heading 3

\n

Nam consectetur dui magna, quis ornare purus fringilla sed. Quisque porttitor eros in sapien interdum, eget hendrerit diam vulputate. Nec vulputate lectus leo eu turpis.

Sed a ex quis\nlorem volutpat rhoncus vel\nnon ligula.\nCurabitur ut elit mi.
\n

Morbi sollicitudin, augue non tempus dignissim, leo ligula vulputate lorem.

Heading 4

\n

Nulla consequat orci sit amet orci gravida, ut maximus lacus feugiat. Curabitur vitae dui in nisl sollicitudin efficitur. Vestibulum non tincidunt dui. Nullam sem lectus, bibendum eget tellus eget, tristique placerat dolor. Nam sollicitudin faucibus leo, a blandit nulla lacinia sed.

\n

Fusce pulvinar risus nec sapien auctor, congue facilisis lorem consectetur. Curabitur porttitor vitae tellus a commodo.

\n
Heading 5
\n

Praesent et efficitur metus. Duis vitae risus id sapien elementum semper. Aliquam sed luctus velit. Aliquam et laoreet ex. Aliquam erat volutpat.

\n

Nullam in tempus purus, ut rhoncus enim. Vestibulum molestie nulla sit amet eleifend eleifend. Pellentesque eu scelerisque velit. In pulvinar, massa in commodo molestie, velit orci maximus massa, eget aliquet libero lacus nec neque. Etiam dui mi, interdum nec accumsan vitae, ornare nec est.

\n
Heading 6
\n

Phasellus auctor vehicula ultricies. Nulla semper et nisl vel pretium. Duis sollicitudin, lorem vel porttitor vulputate, justo felis mollis velit, consequat posuere ipsum dui quis lacus. Morbi vitae ligula vel nibh imperdiet dignissim. Sed eu lorem volutpat est maximus sagittis. Sed fringilla urna id euismod condimentum.

\n

Fusce quis faucibus lacus. Praesent convallis tristique nibh, eu tristique urna porttitor sit amet. Aliquam finibus ut elit a imperdiet.

", "related_articles": ["key", "article-title", "minimum-build", "maximum-build", "related-articles"] }, { "key": "minimum-build", "title": "Build Numbers", "body": "The minimum and maximum build numbers are used to automatically ignore articles when an app's build number (CFBundleVersion in its Info.plist) does not match the article's provide values. They must be specified as integer values (or numeric strings, if necessary), and will be automatically ignored, regardless of user queries.\n\nIf an article has a maximum build set, it will be ignored unless the container app's build number is set to a number less than or equal to the specified value.\n\nThis article has a minimum build of \"10\", which will cause it to be ignored unless the container app's build number is set to a number greater than or equal to 10.", "build_min": 10, "related_articles": ["key", "article-title", "body", "maximum-build", "related-articles"] }, { "key": "maximum-build", "title": "Build Numbers", "body": "The minimum and maximum build numbers are used to automatically ignore articles when an app's build number (CFBundleVersion in its Info.plist) does not match the article's provide values. They must be specified as integer values (or numeric strings, if necessary), and will be automatically ignored, regardless of user queries.\n\nIf an article has a minimum build set, it will be ignored unless the container app's build number is set to a number greater than or equal to the specified value.\n\nThis article has a maximum build of \"9\", which will cause it to be ignored unless the container app's build number is set to a number less than or equal to 9.", "build_max": 9, "related_articles": ["key", "article-title", "body", "minimum-build", "related-articles"] }, { "key": "related-articles", "title": "Related Articles", "body": "Articles can have one or more related articles, which are linked at the bottom of the article view. To specify these, an array containing keys for each article to be linked can be provided (or a single article's key maybe provided as a string). These will automatically be displayed in a \"Related Articles\" section, as seen below, and on all of the other articles within this section.", "related_articles": ["key", "article-title", "body", "minimum-build", "maximum-build"] } ] }, { "title": "Enabling Feedback", "detail": "To enable the feedback section (as seen below), one or both of these properties must be set within the JSON used for the content source.", "articles": [ { "key": "feedback-email", "title": "Email", "body": "The feedback email is displayed to the user at the bottom of the article list, in a dedicated \"Feedback\" section. If sending email is enabled on their device, the user can tap to automatically open a compose screen, with the app's name, marketing version and build number pre-filled in the subject line of the email.\n\nThe provided values are lightly filtered, allowing an email address on its own (i.e. \"support@example.com\"), and can also support a display name (i.e. \"Example Support <support@example.com>\", as seen in the example JSON). Other values will cause the setting to be ignored.", "related_articles": ["feedback-twitter"] }, { "key": "feedback-twitter", "title": "Twitter", "body": "The feedback Twitter handle is displayed to the user at the bottom of the article list, in a dedicated \"Feedback\" section. If their Twitter account is enabled on their device, the user can tap to automatically open the \"tweet sheet\", with the Twitter handle automatically specified.\n\nThe provided values are lightly filtered, and should allow any valid mention string (letters, numbers and underscores), which can optionally begin with the @ symbol (i.e. \"@example_support\", as seen in the example JSON). Other values will cause the setting to be ignored.", "related_articles": ["feedback-email"] } ] } ] }