Typemark Documentation

Connecting to GitHub

Link your project to a GitHub repository so you can edit in Typemark or push from your own editor.

Uuendatud 19. nov 20263 min lugemist

Every project starts with a Git repository that Typemark hosts for you. Connect it to GitHub and your docs live in your own repo: edit in Typemark or push from your editor, and both update your site. Any plan can connect, and the project owner sets it up.

Connect a repository

  1. Install the GitHub App

    In your project, go to Settings > GitHub and click Connect to GitHub. GitHub asks where to install the Typemark app and which repositories it can access.

    Already connected a GitHub account or organization for another project? It's listed in Settings > GitHub: click it to go straight to its repositories.

  2. Pick a repository

    Back in Typemark, choose the repository from the list. If it isn't there, click Give Typemark access to it on GitHub, click Configure next to the account, add the repository and save: GitHub brings you back to the list. Starting fresh? Create an empty repo on GitHub first, then pick it.

  3. Pick a branch

    Your site publishes from the repository's default branch unless you choose another one from Branch. Type to find it in a repository with many branches. An empty repository has no branches yet, so Typemark uses its default branch. See Branches.

  4. Choose what happens to its content

    Typemark checks the repository and suggests what to do. See the next section.

  5. Connect

    Click Connect and confirm. Typemark syncs the repository and rebuilds your site.

You can also start a new project from GitHub: choose Import from GitHub when you create it, and Typemark takes you straight to the GitHub App install.

What happens to your content

Typemark pushes your current docs to the repository's default branch.

Typemark recognizes an existing Typemark project on the branch you picked and pulls it. The branch's content replaces your current docs in Typemark.

If the repository has a docs.json or mint.json, choose Import from GitHub. Typemark converts the config to typemark.json and publishes your existing pages. See Migrating your docs.

Choose one:

  • Push docs to GitHub: your Typemark content replaces the files on the branch you picked.
  • Pull from GitHub: the branch's content replaces your docs in Typemark. It needs a typemark.json at the root to build.

Requirements

  • One repository per project. A repository already connected to another project can't be connected again.
  • The repository must be 100 MB or smaller.
  • Git submodules aren't supported.
  • Typemark uses only the files a docs site needs, so your docs can share a repository with your code. See Files Typemark doesn't use.

After connecting

  • Saves in the Typemark editor are committed with you as the author and pushed to GitHub.
  • Pushes to your deployment branch rebuild your site. See Sync.
  • On Pro and Enterprise, pull requests into your deployment branch get a preview.
  • Your site publishes from the branch you picked. The owner can change it later in Settings > GitHub. See Branches.
  • Settings > GitHub shows the connected repository and the branch it publishes from.

Disconnecting

Click Disconnect in Settings > GitHub and confirm.

  • Your project goes back to a repository hosted by Typemark, with all content as of the last sync.
  • Your GitHub repository isn't changed or deleted.
  • Sync stops in both directions.
  • You can connect again later, to the same repository or a different one.