docusaurus.config.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. require.resolve('docusaurus-plugin-matomo'),
  18. //require.resolve("@cmfcmf/docusaurus-search-local")
  19. [require.resolve('docusaurus-lunr-search'), {
  20. excludeRoutes: [
  21. 'lists/music/**/*', // exclude playlists from indexing
  22. ]
  23. }],
  24. [
  25. '@docusaurus/plugin-content-docs',
  26. {
  27. id: 'notes',
  28. path: 'notes',
  29. routeBasePath: 'notes',
  30. sidebarPath: require.resolve('./sidebarsnotes.js'),
  31. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  32. showLastUpdateTime: true,
  33. },
  34. ],
  35. [
  36. '@docusaurus/plugin-content-docs',
  37. {
  38. id: 'lists',
  39. path: 'lists',
  40. routeBasePath: 'lists',
  41. sidebarPath: require.resolve('./sidebarslists.js'),
  42. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  43. showLastUpdateTime: true,
  44. },
  45. ],
  46. [
  47. '@docusaurus/plugin-content-blog',
  48. {
  49. id: 'posts',
  50. path: 'posts',
  51. routeBasePath: 'posts',
  52. blogTitle: 'Posts',
  53. blogDescription: 'Posts by David Windham',
  54. postsPerPage: 'ALL',
  55. blogSidebarTitle: 'Posts',
  56. blogSidebarCount: 'ALL',
  57. feedOptions: {
  58. type: null,
  59. },
  60. showReadingTime: false,
  61. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  62. },
  63. ],
  64. ],
  65. themeConfig: {
  66. matomo: {
  67. matomoUrl: 'https://davidawindham.com/wik/',
  68. siteId: '1',
  69. phpLoader: 'matomo.php',
  70. jsLoader: 'matomo.js',
  71. },
  72. image: 'img/zw.png',
  73. docs: {
  74. sidebar: {
  75. hideable: true,
  76. },
  77. },
  78. prism: {
  79. additionalLanguages: ['php', 'rust', 'shell-session', 'swift', 'diff'],
  80. },
  81. colorMode: {
  82. defaultMode: 'dark',
  83. disableSwitch: false,
  84. respectPrefersColorScheme: false,
  85. },
  86. navbar: {
  87. hideOnScroll: true,
  88. title: 'TIL',
  89. logo: {
  90. alt: 'windhamdavid',
  91. src: 'img/zw.png',
  92. },
  93. items: [
  94. {to: 'about/',activeBasePath: 'til',label: 'About',position: 'left'},
  95. {to: 'ai', label: 'AI',position: 'left'},
  96. {to: 'docs/',activeBasePath: 'docs',label: 'Docs',position: 'left'},
  97. {to: 'lists/',activeBasePath: 'lists',label: 'Lists',position: 'left'},
  98. {to: 'notes/',activeBasePath: 'notes',label: 'Notes',position: 'left'},
  99. {to: 'posts/',activeBasePath: 'posts',label: 'Posts',position: 'left'},
  100. {to: 'todo', label: 'ToDo', position: 'left'},
  101. {to: 'help', label: 'Help', position: 'left'},
  102. {type: 'search', position: 'left'},
  103. {
  104. href: 'https://davidawindham.com/desk',
  105. label: 'David A. Windham',
  106. 'aria-label': 'David A. Windham',
  107. className: 'header-homepage-link',
  108. target: '_self',
  109. position: 'right',
  110. },
  111. ],
  112. },
  113. },
  114. presets: [
  115. [
  116. '@docusaurus/preset-classic',
  117. {
  118. docs: {
  119. sidebarPath: require.resolve('./sidebars.js'),
  120. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  121. showLastUpdateTime: true,
  122. },
  123. blog: {
  124. blogTitle: 'Posts',
  125. blogDescription: 'Posts by David Windham',
  126. postsPerPage: 'ALL',
  127. blogSidebarTitle: 'Posts',
  128. blogSidebarCount: 'ALL',
  129. feedOptions: {
  130. type: null,
  131. },
  132. showReadingTime: false,
  133. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  134. },
  135. theme: {
  136. customCss: require.resolve('./src/css/custom.css'),
  137. },
  138. },
  139. ],
  140. ],
  141. };