/ docusaurus.config.js
docusaurus.config.js
  1  // @ts-check
  2  // Note: type annotations allow type checking and IDEs autocompletion
  3  require('dotenv').config()
  4  
  5  const math = require('remark-math')
  6  const katex = require('rehype-katex')
  7  
  8  /** @type {import('@docusaurus/types').Config} */
  9  const config = {
 10    title: 'Nimbus | Blog',
 11    url: 'https://blog.nimbus.team/',
 12    baseUrl: '/',
 13  
 14    markdown: {
 15      mermaid: true,
 16    },
 17  
 18    // Even if you don't use internalization, you can use this field to set useful
 19    // metadata like html lang. For example, if your site is Chinese, you may want
 20    // to replace "en" with "zh-Hans".
 21    i18n: {
 22      defaultLocale: 'en',
 23      locales: ['en'],
 24    },
 25  
 26    presets: [
 27      [
 28        '@acid-info/logos-docusaurus-preset',
 29        /** @type {import('@acid-info/logos-docusaurus-preset').PluginOptions} */
 30        ({
 31          customSiteConfig: true,
 32          docs: false,
 33          businessUnit: 'Nimbus',
 34          theme: {
 35            name: 'default',
 36            options: {
 37              customCss: [require.resolve('./src/css/custom.scss')],
 38            },
 39          },
 40          og: {},
 41        }),
 42      ],
 43    ],
 44    plugins: [
 45      [
 46        '@docusaurus/plugin-content-blog',
 47        /** @type {import('@docusaurus/plugin-content-blog').PluginOptions} */
 48        ({
 49          id: 'blog',
 50          routeBasePath: '/',
 51          path: 'posts',
 52          blogTitle: 'Nimbus Blog',
 53          blogDescription:
 54            'Stay updated on Ethereum clients with Nimbus. Find insights, news, and innovations on the Nimbus blog. Join us!',
 55          blogSidebarCount: 0,
 56          authorsMapPath: 'authors.yml',
 57          exclude: ['**/index.mdx'],
 58          remarkPlugins: [math],
 59          rehypePlugins: [katex],
 60        }),
 61      ],
 62      [
 63        '@docusaurus/plugin-client-redirects',
 64        {
 65          redirects: [{ from: '/blog', to: '/' }],
 66          createRedirects(existingPath) {
 67            return existingPath.startsWith('/blog') && existingPath !== '/blog'
 68              ? [existingPath.replace('/blog', '')]
 69              : undefined
 70          },
 71        },
 72      ],
 73      [
 74        '@docusaurus/plugin-content-docs',
 75        {
 76          id: 'root-pages',
 77          routeBasePath: '/',
 78          path: 'root-pages',
 79        },
 80      ],
 81    ],
 82  
 83    themeConfig:
 84      /** @type {import('@acid-info/logos-docusaurus-preset').ThemeConfig} */
 85      ({
 86        navbar: {
 87          items: [
 88            {
 89              type: 'search',
 90            },
 91            {
 92              label: 'About',
 93              href: 'https://nimbus.team/',
 94            },
 95          ],
 96        },
 97        footer: {
 98          links: [
 99            {
100              items: [
101                {
102                  href: 'https://twitter.com/ethnimbus',
103                  label: 'Twitter',
104                },
105                {
106                  href: 'https://discord.gg/EP8DZnXu9y',
107                  label: 'Discord',
108                },
109                {
110                  to: '/docs',
111                  label: 'Docs',
112                },
113                {
114                  href: 'https://github.com/status-im',
115                  label: 'Github',
116                },
117              ],
118            },
119            {
120              items: [
121                {
122                  label: 'Work With Us',
123                  href: 'https://jobs.status.im/',
124                },
125                {
126                  label: 'Terms & Conditions',
127                  to: '/terms',
128                },
129                {
130                  href: '/privacy-policy',
131                  label: 'Privacy Policy',
132                },
133              ],
134            },
135          ],
136        },
137      }),
138  
139    stylesheets: [
140      {
141        href: 'https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css',
142        type: 'text/css',
143        integrity:
144          'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
145        crossorigin: 'anonymous',
146      },
147    ],
148  }
149  
150  module.exports = config