docusaurus.config.js 4.1 KB

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