docusaurus.config.js 3.4 KB

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