Skip to Content
MTD Cloud Docs — Kubernetes-native platform services (Clusters, Serverless, Data Stores, Observability, Confidential Computing).
DocsThemesDocs ThemeInstallation

Docs Theme

Note

This website is built with the docs theme.

you can install the blog theme with the following commands:

Getting start

Install Next.js, Nextra and React

npm i react react-dom next nextra

Install the docs theme

npm i nextra-theme-docs

Create the following Next.js config and theme config under the root directory:

next.config.mjs
import nextra from 'nextra' const withNextra = nextra({ theme: 'nextra-theme-blog', themeConfig: './theme.config.js' }) export default withNextra()
theme.config.js
export default { projectLink: 'https://github.com/shuding/nextra', // GitHub link in the navbar docsRepositoryBase: 'https://github.com/shuding/nextra/blob/master', // base URL for the docs repository titleSuffix: ' – Nextra', nextLinks: true, prevLinks: true, search: true, customSearch: null, // customizable, you can use algolia for example darkMode: true, footer: true, footerText: `MIT ${new Date().getFullYear()} © Shu Ding.`, footerEditLink: `Edit this page on GitHub`, logo: ( <> <svg>...</svg> <span>Next.js Static Site Generator</span> </> ), head: ( <> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="description" content="Nextra: the next docs builder" /> <meta name="og:title" content="Nextra: the next docs builder" /> </> ) }

You are good to go!


Tip

You can also use <style jsx> to style elements inside theme.config.js.