/MyHelpCenter

Primary LanguageSwiftMIT LicenseMIT

This is a repository created from the SupportDocs template. Ignore all files in the main branch.


SupportDocs Logo

SupportDocs Header

Generate help centers for your iOS apps, with Markdown!

Table of Contents

How It Works

  1. Write documents in Markdown
  2. Let GitHub Pages compile the documents into a website
  3. Wait for the GitHub Action to generate a JSON data source and a README for you
  4. The SupportDocs library downloads the JSON and compiles it into a customizable format

How It Works - Graphic

Installation

Installing SupportDocs takes 2 steps:

  1. Set up the GitHub repo where you write your documents
  2. Install the library inside your app

Set up the GitHub repo

This will be where you write your documents. GitHub Pages will translate your Markdown into HTML, and a custom GitHub Action will automatically compile the web pages into a JSON file.

  1. Scroll up to the top of this page and click Use this template
  2. Enter a repo name -- this can be whatever you want
  3. Make sure it's set to Public (If you have GitHub free, GitHub Pages only works for public repos)
  4. Make sure to check Include all branches. This is really important.
  5. Click Create repository from template
  6. In your brand new repo, click the Settings tab
  7. Scroll down to the GitHub Pages section, and specify DataSource branch and / (root) folder. Then click Save.
  8. That's it for the GitHub repo! Now time to install the library in your app.

Install the library

This is the actual interface that your users will see. You can install using CocoaPods or Swift Package Manager, whichever one you prefer.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To install SupportDocs into your Xcode project using CocoaPods, add it in your Podfile:

pod 'SupportDocs'

Swift Package Manager

The Swift Package Manager is built into Xcode, which makes it really easy to use.

  1. Go to your project settings
  2. Click your project
  3. Click the + button
  4. Enter https://github.com/aheze/SupportDocs in the text field
  5. Click Next
  6. Enter the latest version, 0.0.30, in the text field. Leave Up to Next Major selected.
  7. Click Next
  8. Click Finish, and you're done!

Before You Begin

Tag Your Documents

In your documents, add some front matter which sets the title and tags. Take this example document in the DataSource branch.

---
title: Buy blue boba
tags: boba
---

In this front matter, we have a title and one tag. This title has two purposes. It is the tab title if opened in a browser, and it is the title that SupportDocs shows. The tags can be linked as categories when configuring SupportDocs, and can be used to separate documents.

You can see the front matter for the documents in the DataSource branch in this graphic: Front Matter Examples

Library Customization

Pretty much everything in the SupportDocs library can be customized through the SupportOptions struct.

Categories

Navigation Bar

Progress Bar

List Style

Navigation View Style

Other