Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix topbarCtaButton prop in Global Settings and Navigation #331

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
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
18 changes: 9 additions & 9 deletions settings/global.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ settings. Learn more about the [properties](#properties) or from an
### Structure

<ResponseField name="navigation" type="Navigation[]" required>
An array of groups with all the pages within that group
An array of groups with all the pages within that group.
<Expandable title="Navigation">
<ResponseField name="group" type="string">
The name of the group.
Expand All @@ -245,12 +245,12 @@ settings. Learn more about the [properties](#properties) or from an
</ResponseField>

<ResponseField name="topbarLinks" type="TopbarLink[]">
Array of names and urls of links you want to include in the topbar
Array of names and urls of links you want to include in the topbar.
<Expandable title="TopbarLink">
<ResponseField name="name" type="string">
<ResponseField name="name" type="string" required>
The name of the button.
</ResponseField>
<ResponseField name="url" type="string">
<ResponseField name="url" type="string" required>
The url once you click on the button. Example: `https://mintlify.com/contact`
</ResponseField>

Expand All @@ -259,17 +259,17 @@ settings. Learn more about the [properties](#properties) or from an

<ResponseField name="topbarCtaButton" type="Call to Action">
<Expandable title="Topbar Call to Action">
<ResponseField name="type" type={"link or github"} default="link">
Link shows a button. GitHub shows the repo information at the url provided
including the number of GitHub stars.
</ResponseField>
<ResponseField name="url" type="string">
<ResponseField name="url" type="string" required>
If type is a link: What the button links to. If type is a github: Link to
the repository to load GitHub information from.
</ResponseField>
<ResponseField name="name" type="string">
Text inside the button. Only required if type is a link.
</ResponseField>
<ResponseField name="type" type={"link or github"} default="link">
Link shows a button. GitHub shows the repo information at the url provided
including the number of GitHub stars.
</ResponseField>
<ResponseField name="style" type={'"pill" | "roundedRectangle"'}>
The style of the button.
</ResponseField>
Expand Down
8 changes: 4 additions & 4 deletions settings/navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -208,23 +208,23 @@ The `topbarLinks` field supports the following fields: `name`, `url`.

### CTA Button

Customize the call-to-action (CTA) button in the topbar using the `topbarCTA`
Customize the call-to-action (CTA) button in the topbar using the `topbarCtaButton`
field.

<Frame>
<img className="block rounded-md" src="/images/topbar-cta-get-started.png" />
</Frame>

The `topbarCTA` field supports the following fields: `name`, `url`, and `type`.
The `topbarCtaButton` field supports the following fields: `name`, `url`, `type`, `style`, and `arrow`.

```json
"topbarCTA": {
"topbarCtaButton": {
"name": "Get Started",
"url": "https://mintlify.com/get-started"
}
```

#### Github
#### GitHub

You can also configure the CTA button to link directly to your GitHub
repository. Use the `topbarCtaButton` field with the `type` set to `github`.
Expand Down