docusaurus.config.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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: 'Posts',
  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. themeConfig: {
  68. matomo: {
  69. matomoUrl: 'https://davidawindham.com/wik/',
  70. siteId: '1',
  71. phpLoader: 'matomo.php',
  72. jsLoader: 'matomo.js',
  73. },
  74. image: 'img/zw.png',
  75. imageZoom: {
  76. options: {
  77. margin: 40,
  78. background: '#484c57',
  79. scrollOffset: 0,
  80. },
  81. },
  82. docs: {
  83. sidebar: {
  84. hideable: true,
  85. },
  86. },
  87. prism: {
  88. theme: prismThemes.oneDark,
  89. additionalLanguages: ['php', 'rust', 'bash', 'shell-session', 'swift', 'diff'],
  90. },
  91. colorMode: {
  92. defaultMode: 'dark',
  93. disableSwitch: false,
  94. respectPrefersColorScheme: false,
  95. },
  96. navbar: {
  97. hideOnScroll: true,
  98. title: 'TIL',
  99. logo: {
  100. alt: 'windhamdavid',
  101. src: 'img/zw.png',
  102. },
  103. items: [
  104. {to: 'about/',activeBasePath: 'til',label: 'About',position: 'left'},
  105. {to: 'ai', label: 'AI',position: 'left'},
  106. {to: 'docs/',activeBasePath: 'docs',label: 'Docs',position: 'left'},
  107. {to: 'lists/',activeBasePath: 'lists',label: 'Lists',position: 'left'},
  108. {to: 'notes/',activeBasePath: 'notes',label: 'Notes',position: 'left'},
  109. {to: 'posts/',activeBasePath: 'posts',label: 'Posts',position: 'left'},
  110. {to: 'help', label: 'Help', position: 'left'},
  111. {type: 'search', position: 'left'},
  112. {
  113. href: 'https://davidawindham.com/desk',
  114. label: 'David A. Windham',
  115. 'aria-label': 'David A. Windham',
  116. className: 'header-homepage-link',
  117. target: '_self',
  118. position: 'right',
  119. },
  120. ],
  121. },
  122. },
  123. presets: [
  124. [
  125. '@docusaurus/preset-classic',
  126. {
  127. docs: {
  128. sidebarPath: require.resolve('./sidebars.js'),
  129. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  130. showLastUpdateTime: true,
  131. },
  132. blog: {
  133. blogTitle: 'Posts',
  134. blogDescription: 'Posts by David Windham',
  135. postsPerPage: 'ALL',
  136. blogSidebarTitle: 'Posts',
  137. blogSidebarCount: 'ALL',
  138. feedOptions: {
  139. type: null,
  140. },
  141. showReadingTime: false,
  142. editUrl:'https://code.davidawindham.com/david/til/src/main/',
  143. },
  144. theme: {
  145. customCss: require.resolve('./src/css/custom.css'),
  146. },
  147. },
  148. ],
  149. ],
  150. };