Skip to content

Commit

Permalink
feat: WIP add mintlify docs
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed Jun 9, 2024
1 parent ba26ae7 commit d37eda7
Show file tree
Hide file tree
Showing 12 changed files with 3,480 additions and 71 deletions.
49 changes: 49 additions & 0 deletions docs/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions docs/intro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
title: Introduction
description: 'Welcome to the home of your new documentation'
---

<img
className='block dark:hidden'
src='/images/hero-light.svg'
alt='Hero Light'
/>
<img
className='hidden dark:block'
src='/images/hero-dark.svg'
alt='Hero Dark'
/>

## Setting up

The first step to world-class documentation is setting up your editing environments.

<CardGroup cols={2}>
<Card
title='Edit Your Docs'
icon='pen-to-square'
href='https://mintlify.com/docs/quickstart'
>
Get your docs set up locally for easy development
</Card>
<Card
title='Preview Changes'
icon='image'
href='https://mintlify.com/docs/development'
>
Preview your changes before you push to make sure they're perfect
</Card>
</CardGroup>

## Make it yours

Update your docs to your brand and add valuable content for the best user conversion.

<CardGroup cols={2}>
<Card
title='Customize Style'
icon='palette'
href='https://mintlify.com/docs/settings/global'
>
Customize your docs to your company's colors and brands
</Card>
<Card
title='Reference APIs'
icon='code'
href='https://mintlify.com/docs/api-playground/openapi'
>
Automatically generate endpoints from an OpenAPI spec
</Card>
<Card
title='Add Components'
icon='screwdriver-wrench'
href='https://mintlify.com/docs/components/accordion'
>
Build interactive features and designs to guide your users
</Card>
<Card
title='Get Inspiration'
icon='stars'
href='https://mintlify.com/customers'
>
Check out our showcase of our favorite documentation
</Card>
</CardGroup>
File renamed without changes
75 changes: 75 additions & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"$schema": "https://mintlify.com/schema.json",
"name": "Agentic",
"logo": {
"dark": "/media/agentic-header.jpg",
"light": "/media/agentic-header.jpg"
},
"favicon": "/favicon.svg",
"colors": {
"primary": "#0D969D",
"light": "#13D3DC",
"dark": "#0D969D",
"anchors": {
"from": "#0D969D",
"to": "#13D3DC"
}
},
"topbarLinks": [
{
"name": "Twitter",
"url": "https://x.com/transitive_bs"
}
],
"topbarCtaButton": {
"name": "GitHub",
"url": "https://github.com/transitive-bullshit/agentic"
},
"anchors": [
{
"name": "Docs",
"icon": "book-open-cover",
"url": "/"
},
{
"name": "GitHub",
"icon": "github",
"url": "https://github.com/transitive-bullshit/agentic"
}
],
"navigation": [
{
"group": "Get Started",
"pages": [
"intro",
"quickstart",
"usage",
{
"group": "AI SDKs",
"pages": [
"sdks/langchain",
"sdks/llamaindex",
"sdks/vercel-ai",
"sdks/firebase-genkit",
"sdks/dexa-dexter"
]
}
]
},
{
"group": "Services",
"pages": ["services/weather"]
},
{
"group": "TS Reference",
"pages": ["ts/todo"]
}
],
"footerSocials": {
"x": "https://x.com/transitive_bs",
"github": "https://github.com/transitive-bullshit/agentic"
},
"seo": {
"indexHiddenPages": true
}
}
84 changes: 84 additions & 0 deletions docs/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
title: 'Quickstart'
description: 'Start building awesome documentation in under 5 minutes'
---

## Setup your development

Learn how to update your docs locally and and deploy them to the public.

### Edit and preview

<AccordionGroup>
<Accordion icon='github' title='Clone your docs locally'>
During the onboarding process, we created a repository on your Github with
your docs content. You can find this repository on our
[dashboard](https://dashboard.mintlify.com). To clone the repository
locally, follow these
[instructions](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)
in your terminal.
</Accordion>

<Accordion icon='rectangle-terminal' title='Preview changes'>
Previewing helps you make sure your changes look as intended. We built a
command line interface to render these changes locally. 1. Install the
[Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the
documentation changes locally with this command: ``` npm i -g mintlify ```
2. Run the following command at the root of your documentation (where
`mint.json` is): ``` mintlify dev ```
</Accordion>
</AccordionGroup>

### Deploy your changes

<AccordionGroup>
<Accordion icon='message-bot' title='Install our Github app'>
Our Github app automatically deploys your changes to your docs site, so you
don't need to manage deployments yourself. You can find the link to install on
your [dashboard](https://dashboard.mintlify.com). Once the bot has been
successfully installed, there should be a check mark next to the commit hash
of the repo.
</Accordion>

<Accordion icon='rocket' title='Push your changes'>
[Commit and push your changes to
Git](https://docs.github.com/en/get-started/using-git/pushing-commits-to-a-remote-repository#about-git-push)
for your changes to update in your docs site. If you push and don't see that
the Github app successfully deployed your changes, you can also manually
update your docs through our [dashboard](https://dashboard.mintlify.com).
</Accordion>
</AccordionGroup>

## Update your docs

Add content directly in your files with MDX syntax and React components. You can use any of our components, or even build your own.

<CardGroup>
<Card title='Style Your Docs' icon='paintbrush' href='/settings/global'>
Add flair to your docs with personalized branding.
</Card>

<Card
title='Add API Endpoints'
icon='square-code'
href='/api-playground/configuration'
>
Implement your OpenAPI spec and enable API user interaction.
</Card>

<Card
title='Integrate Analytics'
icon='chart-mixed'
href='/analytics/supported-integrations'
>
Draw insights from user interactions with your documentation.
</Card>

<Card
title='Host on a Custom Domain'
icon='browser'
href='/settings/custom-domain/subdomain'
>
Keep your docs on your own website's subdomain.
</Card>
</CardGroup>
98 changes: 98 additions & 0 deletions docs/usage.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: 'Development'
description: 'Learn how to preview changes locally'
---

<Info>
**Prerequisite** You should have installed Node.js (version 18.10.0 or
higher).
</Info>

Step 1. Install Mintlify on your OS:

<CodeGroup>

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

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

</CodeGroup>

Step 2. Go to the docs are located (where you can find `mint.json`) and run the following command:

```bash
mintlify dev
```

The documentation website is now available at `http://localhost:3000`.

### Custom Ports

Mintlify uses port 3000 by default. You can use the `--port` flag to customize the port Mintlify runs on. For example, use this command to run in port 3333:

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

You will see an error like this if you try to run Mintlify in a port that's already taken:

```md
Error: listen EADDRINUSE: address already in use :::3000
```

## Mintlify Versions

Each CLI is linked to a specific version of Mintlify. Please update the CLI if your local website looks different than production.

<CodeGroup>

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

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

</CodeGroup>

## Deployment

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

You should see the following if the deploy successfully went through:

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

## Troubleshooting

Here's how to solve some common problems when working with the CLI.

<AccordionGroup>
<Accordion title="Mintlify is not loading">
Update to Node v18. Run `mintlify install` and try again.
</Accordion>
<Accordion title="No such file or directory on Windows">
Go to the `C:/Users/Username/.mintlify/` directory and remove the `mint`
folder. Then Open the Git Bash in this location and run `git clone
https://github.com/mintlify/mint.git`.

Repeat step 3.

</Accordion>
<Accordion title="Getting an unknown error">
Try navigating to the root of your device and delete the ~/.mintlify folder.
Then run `mintlify dev` again.
</Accordion>
</AccordionGroup>

Curious about what changed in a CLI version? [Check out the CLI changelog.](/changelog/command-line)
Loading

0 comments on commit d37eda7

Please sign in to comment.