docusaurus.config.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /** @type {import('@docusaurus/types').DocusaurusConfig} */
  2. import {themes as prismThemes} from 'prism-react-renderer'
  3. module.exports = {
  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. },
  104. },
  105. prism: {
  106. theme: prismThemes.oneDark,
  107. additionalLanguages: ['php', 'rust', 'bash', 'shell-session', 'swift', 'diff'],
  108. },
  109. mermaid: {
  110. theme: {light: 'base', dark: 'base'},
  111. },
  112. colorMode: {
  113. defaultMode: 'dark',
  114. disableSwitch: false,
  115. respectPrefersColorScheme: false,
  116. },
  117. navbar: {
  118. hideOnScroll: true,
  119. title: 'TIL',
  120. logo: {
  121. alt: 'windhamdavid',
  122. src: 'img/zw.png',
  123. },
  124. items: [
  125. {to: 'about/',activeBasePath: 'til',label: 'About',position: 'left'},
  126. {to: 'ai', label: 'AI',position: 'left'},
  127. {to: 'docs/',activeBasePath: 'docs',label: 'Docs',position: 'left'},
  128. {to: 'lists/',activeBasePath: 'lists',label: 'Lists',position: 'left'},
  129. {to: 'notes/',activeBasePath: 'notes',label: 'Notes',position: 'left'},
  130. {to: 'posts/',activeBasePath: 'posts',label: 'Posts',position: 'left'},
  131. {to: 'help', label: 'Help', position: 'left'},
  132. {type: 'search', position: 'left'},
  133. {
  134. href: 'https://davidawindham.com/desk',
  135. label: 'David A. Windham',
  136. 'aria-label': 'David A. Windham',
  137. className: 'header-homepage-link',
  138. target: '_self',
  139. position: 'right',
  140. },
  141. ],
  142. },
  143. },
  144. presets: [
  145. [
  146. '@docusaurus/preset-classic',
  147. {
  148. docs: {
  149. sidebarPath: require.resolve('./sidebars.js'),
  150. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  151. showLastUpdateTime: true,
  152. },
  153. blog: {
  154. blogTitle: 'Posts',
  155. blogDescription: 'Posts by David Windham',
  156. postsPerPage: 'ALL',
  157. blogSidebarTitle: 'Posts',
  158. blogSidebarCount: 'ALL',
  159. feedOptions: {
  160. type: null,
  161. },
  162. showReadingTime: false,
  163. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  164. },
  165. theme: {
  166. customCss: require.resolve('./src/css/custom.css'),
  167. },
  168. },
  169. ],
  170. ],
  171. };