docusaurus.config.js 5.1 KB

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