Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: Mintlify Starter Kit
description: An overview and introduction to the Mintlify Starter Kit, including development practices and essentials for getting started.
---

# Mintlify Starter Kit

Welcome to the Mintlify Starter Kit! This kit is designed to help you get started with creating and managing your project documentation efficiently. By using this template, you'll have access to a variety of examples and best practices for structuring your documentation, including guide pages, navigation tips, customization options, and API reference pages. Additionally, you'll learn how to leverage popular components to enhance your documentation.

## Quickstart Guide

To begin, click on `Use this template` to copy the Mintlify starter kit into your repository. This action will set up a basic structure for your documentation, including essential files and folders.

### Development

For a seamless development experience, we recommend installing the [Mintlify CLI](https://www.npmjs.com/package/mintlify). This tool allows you to preview your documentation changes locally, ensuring that everything looks as expected before publishing.

To install the Mintlify CLI, run the following command:

```bash
npm i -g mintlify
```

Once installed, navigate to the root of your documentation project (where `docs.json` is located) and start the development server with:

```bash
mintlify dev
```

This command will serve your documentation locally, allowing you to view and test changes in real-time.

### Publishing Changes

To publish your documentation changes, install our GitHub App. This app automatically propagates changes from your repository to your deployment, ensuring that your documentation is always up-to-date. Changes will be deployed to production automatically after pushing to the default branch. You can find the link to install the GitHub App on your Mintlify dashboard.

## API Reference

Incorporate API reference pages into your documentation to provide detailed information about the functions, classes, or methods available in your project. This section should include function signatures, parameter descriptions, return types, and usage examples.

## Development Practices

Adopting best practices in documentation development can significantly enhance the quality and maintainability of your project documentation. Here are a few recommendations:

- Keep your documentation structure consistent.
- Use clear and concise language.
- Include code examples where relevant.
- Regularly update the documentation to reflect changes in the project.

## Essentials

### Troubleshooting

If you encounter issues while using the Mintlify CLI, here are some common solutions:

- **Mintlify dev isn't running**: Run `mintlify install` to re-install dependencies. This command ensures that all necessary packages are correctly installed and up-to-date.
- **Page loads as a 404**: Ensure that you are running the Mintlify CLI in a folder containing `docs.json`. This file is crucial for the CLI to understand and serve your documentation correctly.

By following this guide and utilizing the Mintlify Starter Kit, you'll be well on your way to creating comprehensive and user-friendly documentation for your project. Happy documenting!
53 changes: 53 additions & 0 deletions docs/api-reference/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: API Reference
description: An organized index and overview of the API reference documentation, designed to provide easy navigation and access to detailed API information.
---

# API Reference

Welcome to the API Reference documentation. This section is designed to provide developers with detailed information on the API's capabilities, endpoints, authentication methods, and common error codes. Whether you're integrating for the first time or looking for specific details, this reference aims to assist you in your development process.

## Introduction

The API offers a wide range of endpoints allowing for the manipulation and retrieval of data. Designed with scalability and ease of use in mind, it supports various operations essential for modern application development.

## Endpoints

The API is structured around REST principles, providing predictable and resource-oriented URLs. It supports standard HTTP methods, allowing for CRUD (Create, Read, Update, Delete) operations on resources.

### Key Endpoints

- **User Management**: Create, update, and manage user accounts.
- **Data Querying**: Retrieve data through flexible querying options.
- **Analytics**: Access to analytics and metrics data.

For a detailed list of all available endpoints, refer to the specific endpoint documentation.

## Authentication

Securing API access is paramount. Our API uses OAuth 2.0 for authentication and authorization, ensuring that only authorized users can access sensitive information.

### Obtaining Access Tokens

```typescript
const fetchAccessToken = async (client_id: string, client_secret: string): Promise<string> => {
// Implementation details
};
```

Ensure you keep your `client_id` and `client_secret` secure and never expose them in client-side code.

## Error Codes

Understanding error codes returned by the API is crucial for effective error handling in your application. Common error codes include:

- **400 Bad Request**: The request was unacceptable, often due to missing a required parameter.
- **401 Unauthorized**: No valid API key provided.
- **404 Not Found**: The requested resource doesn't exist.
- **500 Internal Server Error**: We had a problem with our server. Try again later.

For a comprehensive list of error codes and their meanings, refer to the error codes documentation.

---

This API Reference is continually updated to reflect the latest changes and improvements. For additional guidance or support, please refer to our [main documentation](/docs/README.md) or contact our support team.
107 changes: 107 additions & 0 deletions docs/development.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
title: 'Development'
description: 'Preview changes locally to update your docs'
---

<Info>
**Prerequisite**: Please install Node.js (version 19 or higher) before proceeding. <br />
Please upgrade to `docs.json` before proceeding and delete the legacy `mint.json` file.
</Info>

Follow these steps to install and run Mintlify on your operating system:

**Step 1**: Install Mintlify:

<CodeGroup>

```bash npm
npm i -g mintlify
```

```bash yarn
yarn global add mintlify
```

</CodeGroup>

**Step 2**: Navigate to the docs directory (where the `docs.json` file is located) and execute the following command:

```bash
mintlify dev
```

A local preview of your documentation will be available at `http://localhost:3000`.

### Custom Ports

By default, Mintlify uses port 3000. You can customize the port Mintlify runs on by using the `--port` flag. To run Mintlify on port 3333, for instance, use this command:

```bash
mintlify dev --port 3333
```

If you attempt to run Mintlify on a port that's already in use, it will use the next available port:

```md
Port 3000 is already in use. Trying 3001 instead.
```

## Mintlify Versions

Please note that each CLI release is associated with a specific version of Mintlify. If your local website doesn't align with the production version, please update the CLI:

<CodeGroup>

```bash npm
npm i -g mintlify@latest
```

```bash yarn
yarn global upgrade mintlify
```

</CodeGroup>

## Validating Links

The CLI can assist with validating reference links made in your documentation. To identify any broken links, use the following command:

```bash
mintlify broken-links
```

## Deployment

<Tip>
Unlimited editors available under the [Pro
Plan](https://mintlify.com/pricing) and above.
</Tip>

If the deployment is successful, you should see the following:

<Frame>
<img src="/images/checks-passed.png" style={{ borderRadius: '0.5rem' }} />
</Frame>

## Code Formatting

We suggest using extensions on your IDE to recognize and format MDX. If you're a VSCode user, consider the [MDX VSCode extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.

## Troubleshooting

<AccordionGroup>
<Accordion title='Error: Could not load the "sharp" module using the darwin-arm64 runtime'>

This may be due to an outdated version of node. Try the following:
1. Remove the currently-installed version of mintlify: `npm remove -g mintlify`
2. Upgrade to Node v19 or higher.
3. Reinstall mintlify: `npm install -g mintlify`
</Accordion>

<Accordion title="Issue: Encountering an unknown error">

Solution: Go to the root of your device and delete the ~/.mintlify folder. Afterwards, run `mintlify dev` again.
</Accordion>
</AccordionGroup>

Curious about what changed in the CLI version? [Check out the CLI changelog.](https://www.npmjs.com/package/mintlify?activeTab=versions)
159 changes: 159 additions & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
---
title: "Mintlify Documentation Configuration"
description: "Learn how to configure your Mintlify documentation setup to align with the new structure and tooling."
---

## Overview

This guide details the configuration changes for the Mintlify documentation setup, reflecting a shift in documentation structure and tooling. The configuration is defined in a JSON file, `docs.json`, which specifies themes, navigation, and other settings for your documentation site.

## Configuration Schema

The `docs.json` file follows a specific schema designed to customize and organize your documentation effectively. Below is an overview of the key components in the configuration file.

### Theme and Appearance

```json
{
"$schema": "https://mintlify.com/docs.json",
"theme": "mint",
"name": "Mint Starter Kit",
"colors": {
"primary": "#16A34A",
"light": "#07C983",
"dark": "#15803D"
},
"favicon": "/favicon.svg"
}
```

- `$schema`: URL to the schema definition for the configuration file.
- `theme`: Specifies the theme for the documentation site.
- `name`: The name of your documentation site or project.
- `colors`: Defines the color scheme for the site.
- `favicon`: Path to the favicon for the site.

### Navigation

The navigation structure is defined under the `navigation` key, organizing content into tabs and groups for better accessibility.

```json
"navigation": {
"tabs": [
{
"tab": "Guides",
"groups": [
{
"group": "Get Started",
"pages": [
"introduction",
"quickstart",
"development"
]
},
{
"group": "Essentials",
"pages": [
"essentials/markdown",
"essentials/code",
"essentials/images",
"essentials/settings",
"essentials/navigation",
"essentials/reusable-snippets"
]
}
]
},
{
"tab": "API Reference",
"groups": [
{
"group": "API Documentation",
"pages": [
"api-reference/introduction"
]
},
{
"group": "Endpoint Examples",
"pages": [
"api-reference/endpoint/get",
"api-reference/endpoint/create",
"api-reference/endpoint/delete"
]
}
]
}
],
"global": {
"anchors": [
{
"anchor": "Documentation",
"href": "https://mintlify.com/docs",
"icon": "book-open-cover"
},
{
"anchor": "Community",
"href": "https://mintlify.com/community",
"icon": "slack"
},
{
"anchor": "Blog",
"href": "https://mintlify.com/blog",
"icon": "newspaper"
}
]
}
}
```

- `tabs`: Organizes content into main categories or tabs.
- `groups`: Further divides tabs into groups for detailed organization.
- `pages`: Lists the pages under each group.
- `global`: Defines global navigation links accessible from any page.

### Logo and Navigation Bar

Customize the logo and navigation bar links to match your branding and provide quick access to important links.

```json
"logo": {
"light": "/logo/light.svg",
"dark": "/logo/dark.svg"
},
"navbar": {
"links": [
{
"label": "Support",
"href": "mailto:hi@mintlify.com"
}
],
"primary": {
"type": "button",
"label": "Dashboard",
"href": "https://dashboard.mintlify.com"
}
}
```

- `logo`: Specifies the paths to the light and dark versions of your logo.
- `navbar`: Configures the navigation bar with links and a primary button.

### Footer

The footer configuration allows you to add social media links and other important links at the bottom of your documentation site.

```json
"footer": {
"socials": {
"x": "https://x.com/mintlify",
"github": "https://github.com/mintlify",
"linkedin": "https://linkedin.com/company/mintlify"
}
}
```

- `socials`: Links to your project or company's social media profiles.

## Conclusion

The `docs.json` configuration file is a powerful tool for customizing the structure and appearance of your Mintlify documentation site. By adjusting the settings in this file, you can create a documentation experience that is both user-friendly and aligned with your project's branding.
Loading