Introduction
Tyk documentation is built using Mintlify, a platform that allows us to create, manage and publish our documentation. This page provides an overview and guidelines to contributing to Tyk documentation, including setting up dev environment locally, creating new content, and utilize Mintlify’s UI objects.Prerequisites - applys to all flows and tasks
- You’ve set up the Tyk Docs local environment as described in the Getting Started section.
- You have a basic understanding of Page Structure and Navigation in Mintlify.
- You’re familiar with Git and Markdown syntax.
Common steps for every task
- Any update requires a PR
- Please label your PR with the versions you want it to be added to
- Please assign a reviewer that is also a stakeholder who can sign off the change
Getting Started - Running Mintlify locally
This secion provides instructions for setting up your local environment to work with Tyk documentation using Mintlify.- 
Install Mintlify CLI globally:
- 
Clone the Tyk Docs repository:
For external contributions, you will need to fork the Tyk docs repository and clone your fork:
- 
Start the Mintlify development server:
- 
Open your browser and go to http://localhost:3000to view the documentation.
Creating a New Page
To add a new page to the Tyk documentation, follow the steps below.- 
Switch to the mainbranch and pull the latest changes:
- 
Create a new branch:
- 
Create the new page:
The content is organized into folders under the root directory, reflecting the website’s navigation structure (tabs, groups, etc.). Choose the appropriate folder for your new page.
- Create a new .mdxfile for the page. For example, for a page titled “API Versioning” you might create a file namedapi-versioning.mdx.
- Add front matter to the top of the file. This is a YAML block containing metadata like the title, description, and tags.
 - Write your content using Markdown. You can also use Mintlify UI components (e.g., accordions, callouts, code blocks) to improve readability and user experience.
 
- Create a new 
- 
Update docs.json: To make your new page appear in the navigation, update thedocs.jsonfile in the root directory. Example: Adding a new page under the “API Management” tab in the “Overview” group.
- 
Commit and push your changes:
- 
Create a pull request on GitHub to merge your changes into main. Once the PR is opened, a series of automated checks will run:- Link Check: Mintlify checks for broken internal links.
- Spell Check: A vale-spellcheck ensures content quality.
- Documentation Validation: A custom script checks for things like missing images and redirect conflicts.
 
- 
Preview your changes using the link provided by Mintlify before merging.
For Contributors Outside Tyk: A Tyk team member will need to approve the Mintlify CI build for your pull request (PR). You will need to wait
until the CI status is green.
Locating Your Changes: Since there’s no search feature in this Mintlify build, you can find your changes by following these steps:
- Copy the file path: From the file path in GitHub, copy the path, excluding the .mdfile extension.
- Construct the URL: Append this copied path to the Mintlify URL after /docs.
- Example: To see the document at tyk-docs GitHub repository, copy /tyk-self-managed/install(omit.md) and add it after /docs/ in the Netlify URL, resulting in https://branch-name.mintlify.app/docs/tyk-self-managed/install/.
 
- Copy the file path: From the file path in GitHub, copy the path, excluding the 
- 
Merge to main (Updates Nightly)
Once the PR is reviewed, approved, and all checks pass, it can be merged into main. This automatically triggers a deployment, and your changes will go live on the Nightly version of the docs.
- 
Backporting to Release Versions (Cherry-Picking)
If your change needs to be included in a stable release (e.g., v5.9):
- Go to your original, now-merged PR on GitHub.
- Add a label corresponding to the target version, for example, release-5.9.
- That’s it! An automated bot (buger) will detect this label.
 - Cherry-pick the commit from your original PR.
- Create a new PR with those changes, targeting the release-5.9 branch.
- Automatically merge this new PR once all checks pass.
 release-5.9branch triggers themaindeployment workflow, which rebuilds theproductionbranch. Mintlify detects the update and deploys the changes to the live v5.9 documentation.
Updating an Existing Page
To make changes to an existing page in the Tyk documentation, follow these steps:- 
Switch to the mainbranch and pull the latest changes:
- 
Create a new branch:
- 
Locate and edit the page:
- Navigate to the appropriate folder in the repository where the .mdxfile for the page is located.
- Open the file and make your changes using Markdown syntax. You can enhance content using Mintlify UI components like callouts, accordions, tabs, and code blocks.
- If needed, update the front matter (e.g., title,description,tags) at the top of the file.
 
- Navigate to the appropriate folder in the repository where the 
- 
Preview your changes locally to ensure formatting and layout appear as expected.
- 
Commit and push your changes:
- 
Create a pull request on GitHub to merge your branch into main.
- Review the preview link provided in the pull request to verify your changes before merging.
Deleting a Page
To delete a page from the Tyk documentation, follow these steps:- 
Switch to the mainbranch and pull the latest changes:
- 
Create a new branch from main:
- Delete the relevant Markdown file corresponding to the page you want to remove.
- 
Update docs.json:- Remove the entry for the deleted page from the navigationsection.
- Add a redirect in the redirectsection to point users to a relevant page. This prevents 404 errors when the deleted page is accessed.
 
- Remove the entry for the deleted page from the 
- 
Commit and push your changes:
- 
Create a pull request on GitHub to merge your branch into main.
- Review the preview link provided by Mintlify to ensure your changes appear as expected before merging.
Guide for UI features
Apart from the basic markdown writing, Tyk documentation also support UI components like accordions, callouts, cards, expandables, tabs etc. These components help in enhance the documentation’s usability and readability. Here’s a table summarizing the UI features available for Tyk documentation:| Name | Description | 
|---|---|
| Code Blocks | Display inline code and code blocks | 
| Accordions | A dropdown component to toggle content visibility | 
| Callouts | Use callouts to add eye-catching context to your content | 
| Cards | Highlight main points or links with customizable icons | 
| Expandables | Toggle to display nested properties. | 
| Tabs | Toggle content using the Tabs component | 
| Mermaid | Display diagrams using Mermaid | 
| Steps | Sequence content using the Steps component | 
| Snipptet | A custom component written by us. TODO |