settings.mdx 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. ---
  2. title: "Global Settings"
  3. description: "Mintlify gives you complete control over the look and feel of your documentation using the docs.json file"
  4. icon: "gear"
  5. ---
  6. Every Mintlify site needs a `docs.json` file with the core configuration settings. Learn more about the [properties](#properties) below.
  7. ## Properties
  8. <ResponseField name="name" type="string" required>
  9. Name of your project. Used for the global title.
  10. Example: `mintlify`
  11. </ResponseField>
  12. <ResponseField name="navigation" type="Navigation[]" required>
  13. An array of groups with all the pages within that group
  14. <Expandable title="Navigation">
  15. <ResponseField name="group" type="string">
  16. The name of the group.
  17. Example: `Settings`
  18. </ResponseField>
  19. <ResponseField name="pages" type="string[]">
  20. The relative paths to the markdown files that will serve as pages.
  21. Example: `["customization", "page"]`
  22. </ResponseField>
  23. </Expandable>
  24. </ResponseField>
  25. <ResponseField name="logo" type="string or object">
  26. Path to logo image or object with path to "light" and "dark" mode logo images
  27. <Expandable title="Logo">
  28. <ResponseField name="light" type="string">
  29. Path to the logo in light mode
  30. </ResponseField>
  31. <ResponseField name="dark" type="string">
  32. Path to the logo in dark mode
  33. </ResponseField>
  34. <ResponseField name="href" type="string" default="/">
  35. Where clicking on the logo links you to
  36. </ResponseField>
  37. </Expandable>
  38. </ResponseField>
  39. <ResponseField name="favicon" type="string">
  40. Path to the favicon image
  41. </ResponseField>
  42. <ResponseField name="colors" type="Colors">
  43. Hex color codes for your global theme
  44. <Expandable title="Colors">
  45. <ResponseField name="primary" type="string" required>
  46. The primary color. Used most often for highlighted content, section headers, accents, in light mode
  47. </ResponseField>
  48. <ResponseField name="light" type="string">
  49. The primary color for dark mode. Used most often for highlighted content, section headers, accents, in dark mode
  50. </ResponseField>
  51. <ResponseField name="dark" type="string">
  52. The primary color for important buttons
  53. </ResponseField>
  54. <ResponseField name="background" type="object">
  55. The color of the background in both light and dark mode
  56. <Expandable title="Object">
  57. <ResponseField name="light" type="string" required>
  58. The hex color code of the background in light mode
  59. </ResponseField>
  60. <ResponseField name="dark" type="string" required>
  61. The hex color code of the background in dark mode
  62. </ResponseField>
  63. </Expandable>
  64. </ResponseField>
  65. </Expandable>
  66. </ResponseField>
  67. <ResponseField name="topbarLinks" type="TopbarLink[]">
  68. Array of `name`s and `url`s of links you want to include in the topbar
  69. <Expandable title="TopbarLink">
  70. <ResponseField name="name" type="string">
  71. The name of the button.
  72. Example: `Contact us`
  73. </ResponseField>
  74. <ResponseField name="url" type="string">
  75. The url once you click on the button. Example: `https://mintlify.com/docs`
  76. </ResponseField>
  77. </Expandable>
  78. </ResponseField>
  79. <ResponseField name="topbarCtaButton" type="Call to Action">
  80. <Expandable title="Topbar Call to Action">
  81. <ResponseField name="type" type={'"link" or "github"'} default="link">
  82. Link shows a button. GitHub shows the repo information at the url provided including the number of GitHub stars.
  83. </ResponseField>
  84. <ResponseField name="url" type="string">
  85. If `link`: What the button links to.
  86. If `github`: Link to the repository to load GitHub information from.
  87. </ResponseField>
  88. <ResponseField name="name" type="string">
  89. Text inside the button. Only required if `type` is a `link`.
  90. </ResponseField>
  91. </Expandable>
  92. </ResponseField>
  93. <ResponseField name="versions" type="string[]">
  94. Array of version names. Only use this if you want to show different versions of docs with a dropdown in the navigation
  95. bar.
  96. </ResponseField>
  97. <ResponseField name="anchors" type="Anchor[]">
  98. An array of the anchors, includes the `icon`, `color`, and `url`.
  99. <Expandable title="Anchor">
  100. <ResponseField name="icon" type="string">
  101. The [Font Awesome](https://fontawesome.com/search?q=heart) icon used to feature the anchor.
  102. Example: `comments`
  103. </ResponseField>
  104. <ResponseField name="name" type="string">
  105. The name of the anchor label.
  106. Example: `Community`
  107. </ResponseField>
  108. <ResponseField name="url" type="string">
  109. The start of the URL that marks what pages go in the anchor. Generally, this is the name of the folder you put your pages in.
  110. </ResponseField>
  111. <ResponseField name="color" type="string">
  112. The hex color of the anchor icon background. Can also be a gradient if you pass an object with the properties `from` and `to` that are each a hex color.
  113. </ResponseField>
  114. <ResponseField name="version" type="string">
  115. Used if you want to hide an anchor until the correct docs version is selected.
  116. </ResponseField>
  117. <ResponseField name="isDefaultHidden" type="boolean" default="false">
  118. Pass `true` if you want to hide the anchor until you directly link someone to docs inside it.
  119. </ResponseField>
  120. <ResponseField name="iconType" default="duotone" type="string">
  121. One of: "brands", "duotone", "light", "sharp-solid", "solid", or "thin"
  122. </ResponseField>
  123. </Expandable>
  124. </ResponseField>
  125. <ResponseField name="topAnchor" type="Object">
  126. Override the default configurations for the top-most anchor.
  127. <Expandable title="Object">
  128. <ResponseField name="name" default="Documentation" type="string">
  129. The name of the top-most anchor
  130. </ResponseField>
  131. <ResponseField name="icon" default="book-open" type="string">
  132. Font Awesome icon.
  133. </ResponseField>
  134. <ResponseField name="iconType" default="duotone" type="string">
  135. One of: "brands", "duotone", "light", "sharp-solid", "solid", or "thin"
  136. </ResponseField>
  137. </Expandable>
  138. </ResponseField>
  139. <ResponseField name="tabs" type="Tabs[]">
  140. An array of navigational tabs.
  141. <Expandable title="Tabs">
  142. <ResponseField name="name" type="string">
  143. The name of the tab label.
  144. </ResponseField>
  145. <ResponseField name="url" type="string">
  146. The start of the URL that marks what pages go in the tab. Generally, this is the name of the folder you put your
  147. pages in.
  148. </ResponseField>
  149. </Expandable>
  150. </ResponseField>
  151. <ResponseField name="api" type="API">
  152. Configuration for API settings. Learn more about API pages at [API Components](/api-playground/demo).
  153. <Expandable title="API">
  154. <ResponseField name="baseUrl" type="string">
  155. The base url for all API endpoints. If `baseUrl` is an array, it will enable for multiple base url
  156. options that the user can toggle.
  157. </ResponseField>
  158. <ResponseField name="auth" type="Auth">
  159. <Expandable title="Auth">
  160. <ResponseField name="method" type='"bearer" | "basic" | "key"'>
  161. The authentication strategy used for all API endpoints.
  162. </ResponseField>
  163. <ResponseField name="name" type="string">
  164. The name of the authentication parameter used in the API playground.
  165. If method is `basic`, the format should be `[usernameName]:[passwordName]`
  166. </ResponseField>
  167. <ResponseField name="inputPrefix" type="string">
  168. The default value that's designed to be a prefix for the authentication input field.
  169. E.g. If an `inputPrefix` of `AuthKey` would inherit the default input result of the authentication field as `AuthKey`.
  170. </ResponseField>
  171. </Expandable>
  172. </ResponseField>
  173. <ResponseField name="playground" type="Playground">
  174. Configurations for the API playground
  175. <Expandable title="Playground">
  176. <ResponseField name="mode" default="show" type='"show" | "simple" | "hide"'>
  177. Whether the playground is showing, hidden, or only displaying the endpoint with no added user interactivity `simple`
  178. Learn more at the [playground guides](/api-playground/demo)
  179. </ResponseField>
  180. </Expandable>
  181. </ResponseField>
  182. <ResponseField name="maintainOrder" type="boolean">
  183. Enabling this flag ensures that key ordering in OpenAPI pages matches the key ordering defined in the OpenAPI file.
  184. <Warning>This behavior will soon be enabled by default, at which point this field will be deprecated.</Warning>
  185. </ResponseField>
  186. </Expandable>
  187. </ResponseField>
  188. <ResponseField name="openapi" type="string | string[]">
  189. A string or an array of strings of URL(s) or relative path(s) pointing to your
  190. OpenAPI file.
  191. Examples:
  192. <CodeGroup>
  193. ```json Absolute
  194. "openapi": "https://example.com/openapi.json"
  195. ```
  196. ```json Relative
  197. "openapi": "/openapi.json"
  198. ```
  199. ```json Multiple
  200. "openapi": ["https://example.com/openapi1.json", "/openapi2.json", "/openapi3.json"]
  201. ```
  202. </CodeGroup>
  203. </ResponseField>
  204. <ResponseField name="footerSocials" type="FooterSocials">
  205. An object of social media accounts where the key:property pair represents the social media platform and the account url.
  206. Example:
  207. ```json
  208. {
  209. "x": "https://x.com/mintlify",
  210. "website": "https://mintlify.com"
  211. }
  212. ```
  213. <Expandable title="FooterSocials">
  214. <ResponseField name="[key]" type="string">
  215. One of the following values `website`, `facebook`, `x`, `discord`, `slack`, `github`, `linkedin`, `instagram`, `hacker-news`
  216. Example: `x`
  217. </ResponseField>
  218. <ResponseField name="property" type="string">
  219. The URL to the social platform.
  220. Example: `https://x.com/mintlify`
  221. </ResponseField>
  222. </Expandable>
  223. </ResponseField>
  224. <ResponseField name="feedback" type="Feedback">
  225. Configurations to enable feedback buttons
  226. <Expandable title="Feedback">
  227. <ResponseField name="suggestEdit" type="boolean" default="false">
  228. Enables a button to allow users to suggest edits via pull requests
  229. </ResponseField>
  230. <ResponseField name="raiseIssue" type="boolean" default="false">
  231. Enables a button to allow users to raise an issue about the documentation
  232. </ResponseField>
  233. </Expandable>
  234. </ResponseField>
  235. <ResponseField name="modeToggle" type="ModeToggle">
  236. Customize the dark mode toggle.
  237. <Expandable title="ModeToggle">
  238. <ResponseField name="default" type={'"light" or "dark"'}>
  239. Set if you always want to show light or dark mode for new users. When not
  240. set, we default to the same mode as the user's operating system.
  241. </ResponseField>
  242. <ResponseField name="isHidden" type="boolean" default="false">
  243. Set to true to hide the dark/light mode toggle. You can combine `isHidden` with `default` to force your docs to only use light or dark mode. For example:
  244. <CodeGroup>
  245. ```json Only Dark Mode
  246. "modeToggle": {
  247. "default": "dark",
  248. "isHidden": true
  249. }
  250. ```
  251. ```json Only Light Mode
  252. "modeToggle": {
  253. "default": "light",
  254. "isHidden": true
  255. }
  256. ```
  257. </CodeGroup>
  258. </ResponseField>
  259. </Expandable>
  260. </ResponseField>
  261. <ResponseField name="backgroundImage" type="string">
  262. A background image to be displayed behind every page. See example with [Infisical](https://infisical.com/docs) and
  263. [FRPC](https://frpc.io).
  264. </ResponseField>