docusaurus.config.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. logo: {
  87. alt: 'Immich University Logo',
  88. src: 'img/color-logo.png',
  89. srcDark: 'img/logo.png',
  90. },
  91. items: [
  92. {
  93. to: '/docs/overview/introduction',
  94. position: 'right',
  95. label: 'Docs',
  96. },
  97. {
  98. to: '/docs/api',
  99. position: 'right',
  100. label: 'API',
  101. },
  102. {
  103. href: 'https://github.com/immich-app/immich',
  104. label: 'GitHub',
  105. position: 'right',
  106. },
  107. ],
  108. },
  109. footer: {
  110. style: 'light',
  111. links: [
  112. {
  113. title: 'Overview',
  114. items: [
  115. {
  116. label: 'Welcome',
  117. to: '/docs/overview/introduction',
  118. },
  119. {
  120. label: 'Installation',
  121. to: '/docs/install/requirements',
  122. },
  123. ],
  124. },
  125. {
  126. title: 'Community',
  127. items: [
  128. {
  129. label: 'Discord',
  130. href: 'https://discord.com/invite/D8JsnBEuKb',
  131. },
  132. ],
  133. },
  134. {
  135. title: 'Links',
  136. items: [
  137. // {
  138. // label: "Blog",
  139. // to: "/blog",
  140. // },
  141. {
  142. label: 'GitHub',
  143. href: 'https://github.com/immich-app/immich',
  144. },
  145. ],
  146. },
  147. ],
  148. copyright: `Immich is available as open source under the terms of the MIT License.`,
  149. },
  150. prism: {
  151. theme: lightCodeTheme,
  152. darkTheme: darkCodeTheme,
  153. },
  154. image: 'overview/img/feature-panel.png',
  155. }),
  156. };
  157. module.exports = config;