docusaurus.config.js 5.0 KB

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