docusaurus.config.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. // @ts-check
  2. // Note: type annotations allow type checking and IDEs autocompletion
  3. const lightCodeTheme = require('prism-react-renderer/themes/github');
  4. const darkCodeTheme = require('prism-react-renderer/themes/dracula');
  5. /** @type {import('@docusaurus/types').Config} */
  6. const config = {
  7. title: 'Immich',
  8. tagline:
  9. 'High performance self-hosted photo and video backup solution directly from your mobile phone',
  10. url: 'https://documentation.immich.app',
  11. baseUrl: '/',
  12. onBrokenLinks: 'throw',
  13. onBrokenMarkdownLinks: 'warn',
  14. favicon: 'img/favicon.png',
  15. // GitHub pages deployment config.
  16. // If you aren't using GitHub pages, you don't need these.
  17. organizationName: 'immich-app', // Usually your GitHub org/user name.
  18. projectName: 'immich', // Usually your repo name.
  19. deploymentBranch: 'main',
  20. // Even if you don't use internalization, you can use this field to set useful
  21. // metadata like html lang. For example, if your site is Chinese, you may want
  22. // to replace "en" with "zh-Hans".
  23. i18n: {
  24. defaultLocale: 'en',
  25. locales: ['en'],
  26. },
  27. plugins: [
  28. async function myPlugin(context, options) {
  29. return {
  30. name: 'docusaurus-tailwindcss',
  31. configurePostCss(postcssOptions) {
  32. // Appends TailwindCSS and AutoPrefixer.
  33. postcssOptions.plugins.push(require('tailwindcss'));
  34. postcssOptions.plugins.push(require('autoprefixer'));
  35. return postcssOptions;
  36. },
  37. };
  38. },
  39. require.resolve('docusaurus-lunr-search'),
  40. ],
  41. presets: [
  42. [
  43. 'docusaurus-preset-openapi',
  44. /** @type {import('docusaurus-preset-openapi').Options} */
  45. ({
  46. docs: {
  47. showLastUpdateAuthor: true,
  48. showLastUpdateTime: true,
  49. sidebarPath: require.resolve('./sidebars.js'),
  50. // Please change this to your repo.
  51. // Remove this to remove the "edit this page" links.
  52. editUrl: 'https://github.com/immich-app/immich/tree/main/docs/',
  53. },
  54. api: {
  55. path: '../server/immich-openapi-specs.json',
  56. routeBasePath: '/docs/api',
  57. },
  58. // blog: {
  59. // showReadingTime: true,
  60. // editUrl: "https://github.com/immich-app/immich/tree/main/docs/",
  61. // },
  62. theme: {
  63. customCss: require.resolve('./src/css/custom.css'),
  64. },
  65. }),
  66. ],
  67. ],
  68. themeConfig:
  69. /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
  70. ({
  71. colorMode: {
  72. defaultMode: 'dark',
  73. },
  74. announcementBar: {
  75. id: 'site_announcement_immich',
  76. content: `⚠️ The project is under <strong>very active</strong> development. Expect bugs and changes. Do not use it as <strong>the only way</strong> to store your photos and videos!`,
  77. backgroundColor: '#593f00',
  78. textColor: '#ffefc9',
  79. isCloseable: false,
  80. },
  81. docs: {
  82. sidebar: {
  83. autoCollapseCategories: false,
  84. },
  85. },
  86. navbar: {
  87. logo: {
  88. alt: 'Immich University Logo',
  89. src: 'img/color-logo.png',
  90. srcDark: 'img/logo.png',
  91. },
  92. items: [
  93. {
  94. to: '/docs/overview/introduction',
  95. position: 'right',
  96. label: 'Docs',
  97. },
  98. {
  99. to: '/docs/api',
  100. position: 'right',
  101. label: 'API',
  102. },
  103. {
  104. href: 'https://github.com/immich-app/immich',
  105. label: 'GitHub',
  106. position: 'right',
  107. },
  108. {
  109. href: 'https://github.com/orgs/immich-app/projects/1',
  110. label: 'Roadmap',
  111. position: 'right',
  112. },
  113. ],
  114. },
  115. footer: {
  116. style: 'light',
  117. links: [
  118. {
  119. title: 'Overview',
  120. items: [
  121. {
  122. label: 'Welcome',
  123. to: '/docs/overview/introduction',
  124. },
  125. {
  126. label: 'Installation',
  127. to: '/docs/install/requirements',
  128. },
  129. ],
  130. },
  131. {
  132. title: 'Community',
  133. items: [
  134. {
  135. label: 'Discord',
  136. href: 'https://discord.com/invite/D8JsnBEuKb',
  137. },
  138. ],
  139. },
  140. {
  141. title: 'Links',
  142. items: [
  143. // {
  144. // label: "Blog",
  145. // to: "/blog",
  146. // },
  147. {
  148. label: 'GitHub',
  149. href: 'https://github.com/immich-app/immich',
  150. },
  151. {
  152. label: 'Roadmap',
  153. href: 'https://github.com/orgs/immich-app/projects/1',
  154. },
  155. ],
  156. },
  157. ],
  158. copyright: `Immich is available as open source under the terms of the MIT License.`,
  159. },
  160. prism: {
  161. theme: lightCodeTheme,
  162. darkTheme: darkCodeTheme,
  163. },
  164. image: 'overview/img/feature-panel.png',
  165. }),
  166. };
  167. module.exports = config;