settings.mdx 11 KB

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