docusaurus.config.js 2.9 KB

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