For tools and behaviors not covered by Mintlify’s built-in integrations, you can inject custom scripts and styles into every page of your docs site.Documentation Index
Fetch the complete documentation index at: https://product-guide-starter-replace-template-content.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Custom CSS
Create astyle.css file at the root of your repository. Mintlify automatically loads it on every page. Use it to override default styles or add custom UI elements:
style.css in docs.json to ensure it’s applied:
Custom JavaScript via Google Tag Manager
The cleanest way to inject arbitrary scripts is through Google Tag Manager. Add the GTM integration todocs.json:
Common use cases
| Use case | Recommended approach |
|---|---|
| A/B testing (Optimizely, VWO) | Google Tag Manager |
| Session recording (FullStory) | Built-in integration or GTM |
| Custom chat widget | GTM or built-in Intercom integration |
| Scroll depth tracking | GTM with a custom trigger |
| Banner or promotional overlay | Custom JavaScript via GTM |
React components
For more complex UI requirements, Mintlify supports custom React components. Add acomponents/ directory to your repository and reference components in your MDX files. This is the right approach for reusable UI patterns that go beyond what CSS can do.
Custom React components require familiarity with MDX and React. Changes to component code trigger a full rebuild of your docs site.