docusaurus.config.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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: 'High performance self-hosted photo and video backup solution directly from your mobile phone',
  9. url: 'https://documentation.immich.app',
  10. baseUrl: '/',
  11. onBrokenLinks: 'throw',
  12. onBrokenMarkdownLinks: 'warn',
  13. favicon: 'img/favicon.png',
  14. // GitHub pages deployment config.
  15. // If you aren't using GitHub pages, you don't need these.
  16. organizationName: 'immich-app', // Usually your GitHub org/user name.
  17. projectName: 'immich', // Usually your repo name.
  18. deploymentBranch: 'main',
  19. // Even if you don't use internalization, you can use this field to set useful
  20. // metadata like html lang. For example, if your site is Chinese, you may want
  21. // to replace "en" with "zh-Hans".
  22. i18n: {
  23. defaultLocale: 'en',
  24. locales: ['en'],
  25. },
  26. plugins: [
  27. async function myPlugin(context, options) {
  28. return {
  29. name: 'docusaurus-tailwindcss',
  30. configurePostCss(postcssOptions) {
  31. // Appends TailwindCSS and AutoPrefixer.
  32. postcssOptions.plugins.push(require('tailwindcss'));
  33. postcssOptions.plugins.push(require('autoprefixer'));
  34. return postcssOptions;
  35. },
  36. };
  37. },
  38. require.resolve('docusaurus-lunr-search'),
  39. ],
  40. presets: [
  41. [
  42. 'docusaurus-preset-openapi',
  43. /** @type {import('docusaurus-preset-openapi').Options} */
  44. ({
  45. docs: {
  46. showLastUpdateAuthor: true,
  47. showLastUpdateTime: true,
  48. sidebarPath: require.resolve('./sidebars.js'),
  49. // Please change this to your repo.
  50. // Remove this to remove the "edit this page" links.
  51. editUrl: 'https://github.com/immich-app/immich/tree/main/docs/',
  52. },
  53. api: {
  54. path: '../server/immich-openapi-specs.json',
  55. routeBasePath: '/docs/api',
  56. },
  57. // blog: {
  58. // showReadingTime: true,
  59. // editUrl: "https://github.com/immich-app/immich/tree/main/docs/",
  60. // },
  61. theme: {
  62. customCss: require.resolve('./src/css/custom.css'),
  63. },
  64. }),
  65. ],
  66. ],
  67. themeConfig:
  68. /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
  69. ({
  70. colorMode: {
  71. defaultMode: 'dark',
  72. },
  73. announcementBar: {
  74. id: 'site_announcement_immich',
  75. 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!`,
  76. backgroundColor: '#593f00',
  77. textColor: '#ffefc9',
  78. isCloseable: false,
  79. },
  80. docs: {
  81. sidebar: {
  82. autoCollapseCategories: false,
  83. },
  84. },
  85. navbar: {
  86. title: 'IMMICH',
  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. to: '/blog',
  105. position: 'right',
  106. label: 'Blog',
  107. },
  108. {
  109. href: 'https://github.com/immich-app/immich',
  110. label: 'GitHub',
  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. },
  153. ],
  154. copyright: `Immich is available as open source under the terms of the MIT License.`,
  155. },
  156. prism: {
  157. theme: lightCodeTheme,
  158. darkTheme: darkCodeTheme,
  159. additionalLanguages: ['sql'],
  160. },
  161. image: 'overview/img/feature-panel.png',
  162. }),
  163. };
  164. module.exports = config;