docusaurus.config.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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. ],
  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. to: "/blog",
  104. position: "right",
  105. label: "Blog",
  106. },
  107. {
  108. href: "https://github.com/immich-app/immich",
  109. label: "GitHub",
  110. position: "right",
  111. },
  112. ],
  113. },
  114. footer: {
  115. style: "light",
  116. links: [
  117. {
  118. title: "Overview",
  119. items: [
  120. {
  121. label: "Welcome",
  122. to: "/docs/overview/introduction",
  123. },
  124. {
  125. label: "Installation",
  126. to: "/docs/install/requirements",
  127. },
  128. ],
  129. },
  130. {
  131. title: "Community",
  132. items: [
  133. {
  134. label: "Discord",
  135. href: "https://discord.com/invite/D8JsnBEuKb",
  136. },
  137. ],
  138. },
  139. {
  140. title: "More",
  141. items: [
  142. {
  143. label: "Blog",
  144. to: "/blog",
  145. },
  146. {
  147. label: "GitHub",
  148. href: "https://github.com/immich-app/immich",
  149. },
  150. ],
  151. },
  152. ],
  153. copyright: `Immich is available as open source under the terms of the MIT License.`,
  154. },
  155. prism: {
  156. theme: lightCodeTheme,
  157. darkTheme: darkCodeTheme,
  158. },
  159. image: "overview/img/feature-panel.png",
  160. }),
  161. };
  162. module.exports = config;