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
2 changes: 1 addition & 1 deletion api-playground/openapi-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@

Add an `openapi` field to any navigation element in your `docs.json` to automatically generate pages for OpenAPI endpoints. You can control where these pages appear in your navigation structure, as dedicated API sections or with other pages.

The `openapi` field accepts either a path in your docs repo or a URL to a hosted OpenAPI document.
The `openapi` field accepts either a path in your docs repo or a URL to a hosted OpenAPI document. Hosted specs must be reachable from the public internet; `localhost` URLs and private hosts cannot be fetched at build time.

Check warning on line 346 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L346

Use semicolons judiciously.

Check warning on line 346 in api-playground/openapi-setup.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-playground/openapi-setup.mdx#L346

In general, use active voice instead of passive voice ('be fetched').

<Tip>
When you use a URL for your OpenAPI spec, changes to the spec don't trigger a Git push, so your docs won't redeploy automatically. To keep your docs in sync, call the [Trigger deployment](/api/update/trigger) API endpoint in the same CI action that generates or updates your spec. This way your docs update automatically without needing to manually trigger a deployment from the dashboard.
Expand Down
43 changes: 43 additions & 0 deletions customize/custom-scripts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,49 @@
</Accordion>
</AccordionGroup>

### Common customizations

Mintlify's appearance settings in `docs.json` do not include options for sidebar width, font size, or other fine-grained layout controls. To adjust these, target the selectors above with custom CSS.

Check warning on line 348 in customize/custom-scripts.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

customize/custom-scripts.mdx#L348

Use 'preceding' instead of 'above'.

<AccordionGroup>
<Accordion title="Change the sidebar width">
Override the sidebar container width to make the sidebar narrower or wider. The main content area adjusts automatically.

```css
#sidebar {
width: 240px;
}
```
</Accordion>
<Accordion title="Change the sidebar font size">
The `fonts` field in `docs.json` sets font family and weight, but not font size. Use custom CSS to resize sidebar text.

```css
#sidebar-content {
font-size: 0.8rem;
}
```
</Accordion>
<Accordion title="Change the body font size">
Resize the main content area without changing headings.

```css
#content-area {
font-size: 0.95rem;
}
```
</Accordion>
<Accordion title="Hide the sign-in or CTA button">
Prefer removing `navbar.primary` from `docs.json` when possible. If you need to hide the button conditionally with CSS, target its ID:

```css
#topbar-cta-button {
display: none;
}
```
</Accordion>
</AccordionGroup>

## Custom JavaScript

Custom JS lets you add custom executable code globally. It is the equivalent of adding a `<script>` tag with JS code into every page.
Expand All @@ -350,7 +393,7 @@
Mintlify includes any `.js` file inside your content directory on every page of your documentation site. Custom JavaScript files run after the page becomes interactive. You cannot scope them to specific pages. For example, you can add the following `ga.js` file to enable [Google Analytics](https://marketingplatform.google.com/about/analytics) across the entire documentation.

```js
window.dataLayer = window.dataLayer || [];

Check warning on line 396 in customize/custom-scripts.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

customize/custom-scripts.mdx#L396

Did you really mean 'indo'?
function gtag() {
dataLayer.push(arguments);
}
Expand Down
Loading