docusaurus.config.js 3.8 KB

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