docusaurus.config.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /** @type {import('@docusaurus/types').DocusaurusConfig} */
  2. import {themes as prismThemes} from 'prism-react-renderer'
  3. export default {
  4. title: 'David Windham | TIL',
  5. tagline: 'Because Today I Learned',
  6. url: 'https://davidawindham.com',
  7. baseUrl: '/til/',
  8. onBrokenLinks: 'throw',
  9. onBrokenMarkdownLinks: 'warn',
  10. favicon: 'img/favicon.ico',
  11. organizationName: 'windhamdavid',
  12. projectName: 'til',
  13. markdown: {
  14. mermaid: true,
  15. },
  16. themes: ['@docusaurus/theme-mermaid'],
  17. plugins: [
  18. 'plugin-image-zoom',
  19. require.resolve('docusaurus-plugin-matomo'),
  20. //require.resolve("@cmfcmf/docusaurus-search-local")
  21. [require.resolve('docusaurus-lunr-search'), {
  22. excludeRoutes: [
  23. 'lists/music/**/*', // exclude playlists from indexing
  24. ]
  25. }],
  26. [
  27. '@docusaurus/plugin-content-docs',
  28. {
  29. id: 'notes',
  30. path: 'notes',
  31. routeBasePath: 'notes',
  32. sidebarPath: require.resolve('./sidebarsnotes.js'),
  33. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  34. showLastUpdateTime: true,
  35. },
  36. ],
  37. [
  38. '@docusaurus/plugin-content-docs',
  39. {
  40. id: 'lists',
  41. path: 'lists',
  42. routeBasePath: 'lists',
  43. sidebarPath: require.resolve('./sidebarslists.js'),
  44. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  45. showLastUpdateTime: true,
  46. },
  47. ],
  48. [
  49. '@docusaurus/plugin-content-blog',
  50. {
  51. id: 'posts',
  52. path: 'posts',
  53. routeBasePath: 'posts',
  54. blogTitle: 'Posts',
  55. blogDescription: 'Posts by David Windham',
  56. postsPerPage: 'ALL',
  57. blogSidebarTitle: ' ',
  58. blogSidebarCount: 'ALL',
  59. feedOptions: {
  60. type: null,
  61. },
  62. showReadingTime: false,
  63. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  64. },
  65. ],
  66. [
  67. '@docusaurus/plugin-content-blog',
  68. {
  69. id: 'ideas',
  70. path: 'ideas',
  71. routeBasePath: 'ideas',
  72. blogTitle: 'Ideas',
  73. blogDescription: 'Ideas by David Windham',
  74. postsPerPage: 'ALL',
  75. blogSidebarTitle: 'Ideas',
  76. blogSidebarCount: 'ALL',
  77. feedOptions: {
  78. type: null,
  79. },
  80. showReadingTime: false,
  81. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  82. },
  83. ],
  84. ],
  85. themeConfig: {
  86. matomo: {
  87. matomoUrl: 'https://davidawindham.com/wik/',
  88. siteId: '1',
  89. phpLoader: 'matomo.php',
  90. jsLoader: 'matomo.js',
  91. },
  92. image: 'img/opengraph_image.jpg',
  93. imageZoom: {
  94. options: {
  95. margin: 40,
  96. background: '#484c57',
  97. scrollOffset: 0,
  98. },
  99. },
  100. docs: {
  101. sidebar: {
  102. hideable: true,
  103. autoCollapseCategories: true,
  104. },
  105. },
  106. prism: {
  107. theme: prismThemes.oneDark,
  108. additionalLanguages: ['php', 'rust', 'bash', 'shell-session', 'swift', 'diff'],
  109. },
  110. mermaid: {
  111. theme: {light: 'base', dark: 'base'},
  112. },
  113. colorMode: {
  114. defaultMode: 'dark',
  115. disableSwitch: false,
  116. respectPrefersColorScheme: false,
  117. },
  118. navbar: {
  119. hideOnScroll: true,
  120. title: 'TIL',
  121. logo: {
  122. alt: 'windhamdavid',
  123. src: 'img/zw.png',
  124. },
  125. items: [
  126. {to: 'about/',activeBasePath: 'til',label: 'About',position: 'left'},
  127. {to: 'ai', label: 'AI',position: 'left'},
  128. {to: 'docs/',activeBasePath: 'docs',label: 'Docs',position: 'left'},
  129. {to: 'lists/',activeBasePath: 'lists',label: 'Lists',position: 'left'},
  130. {to: 'notes/',activeBasePath: 'notes',label: 'Notes',position: 'left'},
  131. {to: 'posts/',activeBasePath: 'posts',label: 'Posts',position: 'left'},
  132. {to: 'help', label: 'Help', position: 'left'},
  133. {type: 'search', position: 'left'},
  134. {
  135. href: 'https://davidawindham.com/desk',
  136. label: 'David A. Windham',
  137. 'aria-label': 'David A. Windham',
  138. className: 'header-homepage-link',
  139. target: '_self',
  140. position: 'right',
  141. },
  142. ],
  143. },
  144. },
  145. presets: [
  146. [
  147. '@docusaurus/preset-classic',
  148. {
  149. docs: {
  150. sidebarPath: require.resolve('./sidebars.js'),
  151. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  152. showLastUpdateTime: true,
  153. },
  154. blog: {
  155. blogTitle: 'Posts',
  156. blogDescription: 'Posts by David Windham',
  157. postsPerPage: 'ALL',
  158. blogSidebarTitle: 'Posts',
  159. blogSidebarCount: 'ALL',
  160. feedOptions: {
  161. type: null,
  162. },
  163. showReadingTime: false,
  164. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  165. },
  166. theme: {
  167. customCss: require.resolve('./src/css/custom.css'),
  168. },
  169. },
  170. ],
  171. ],
  172. };