Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@visulima/nextra-theme-docs

visulima591MIT4.0.26TypeScript support: included

A Visulima Nextra theme for documentation sites.

anolilab, visulima, nextra, theme, docs

readme

Visulima nextra-theme-docs

Nextra Docs Theme is a theme that includes almost everything you need to build a modern documentation website. It includes a top navigation bar, a search bar, a pages sidebar, a TOC sidebar, and other built-in components.
Visulima nextra-theme-doc is built on top of

Nextra, Tailwind CSS, Next.js, giscus, react-hot-toast,


typescript-image npm-image license-image


Daniel Bannert's open source work is supported by the community on GitHub Sponsors


Look and feel

Install

If you have a Nextra project, you can install the theme with:

npm install @visulima/nextra-theme-docs zod
yarn add @visulima/nextra-theme-docs zod
pnpm add @visulima/nextra-theme-docs zod

if you don't have a Nextra project, you can use the Next CLI to create one and install

npm install nextra @visulima/nextra-theme-docs zod
yarn add nextra @visulima/nextra-theme-docs zod
pnpm add nextra @visulima/nextra-theme-docs zod

Add Next.js Config

If not there create the following next.config.js file in your project’s root directory:

const withNextra = require("nextra")({
    theme: "@visulima/nextra-theme-docs",
    themeConfig: "./theme.config.jsx",
});

module.exports = withNextra();

// If you have other Next.js configurations, you can pass them as the parameter:
// module.exports = withNextra({ /* other next.js config */ })

Add Css style to your pages/_app.{jsx,tsx,mdx} file

import "@visulima/nextra-theme-docs/style";

import type { AppProps } from "next/app";
import Head from "next/head";
import type { FC, ReactElement } from "react";
import React from "react";

const MyApp: FC<AppProps & { Component: AppProps["Component"] & { getLayout?: (component: ReactElement) => ReactElement } }> = ({ Component, pageProps }) => {
    const getLayout: (component: ReactElement) => ReactElement = Component.getLayout ?? ((page) => page);

    return (
        <>
            <Head>
                <link as="font" crossOrigin="anonymous" href="/Inter.var.woff2" rel="preload" type="font/woff2" />
            </Head>
            {/* eslint-disable-next-line react/jsx-props-no-spreading */}
            {getLayout(<Component {...pageProps} />)}
        </>
    );
};

export default MyApp;
import { SkipNavLink } from "@visulima/nextra-theme-docs/components";
import Document, { Head, Html, Main, NextScript } from "next/document";
import type { ReactElement } from "react";
import React from "react";

class MyDocument extends Document {
    public render(): ReactElement {
        return (
            <Html lang="en">
                <Head />
                <body className="relative">
                    <SkipNavLink />
                    <Main />
                    <NextScript />
                </body>
            </Html>
        );
    }
}

export default MyDocument;

Create Docs Theme Config

Lastly, create the corresponding theme.config.jsx file in your project’s root directory. This will be used to configure the Nextra Docs theme:

export default {
    logo: <span>My Nextra Documentation</span>,
    project: {
        link: "https://github.com/shuding/nextra",
    },
    // ...
};

Ready to Go!

Now, you can create your first MDX page as pages/index.mdx:

## Welcome to Nextra

Hello, world!

For more information, check out the Nextra documentation. You can also check the example project here.

Supported Node.js Versions

Libraries in this ecosystem make the best effort to track Node.js’ release schedule. Here’s a post on why we think this is important.

Contributing

If you would like to help take a look at the list of issues and check our Contributing guild.

Note: please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Credits

License

The visulima nextra-theme-docs is open-sourced software licensed under the MIT

changelog

@visulima/nextra-theme-docs 4.0.26 (2024-06-06)

Bug Fixes

@visulima/nextra-theme-docs 4.0.25 (2024-06-05)

Bug Fixes

  • nextra-theme-docs: updated react-medium-image-zoom and react-wrap-balancer (2a31692)

Miscellaneous Chores

  • changed semantic-release-npm to pnpm (b6d100a)

@visulima/nextra-theme-docs 4.0.24 (2024-05-15)

Bug Fixes

  • nextra-theme-docs: updated react-medium-image-zoom to version 5.2.0 (9390706)

Styles

Miscellaneous Chores

  • nextra-theme-docs: updated devDependencies (9fabe81)
  • update lock and cs fixes (2e74a2c)
  • updated dev dependencies (abd319c)
  • updated dev dependencies (0767afe)
  • updated dev dependencies (d7791e3)
  • updated dev dependencies (6005345)

@visulima/nextra-theme-docs 4.0.23 (2024-04-27)

Bug Fixes

  • nextra-theme-docs: updated clsx dep and dev deps (8f8504a)

@visulima/nextra-theme-docs 4.0.22 (2024-04-17)

Bug Fixes

  • nextra-theme-docs: fixed build error (ac310a0)
  • nextra-theme-docs: updated headlessui to 1.7.19 (dd5ebc3)

Miscellaneous Chores

  • downgrade eslint-plugin-vitest (0162771)
  • update dev dependencies (09c4854)

@visulima/nextra-theme-docs 4.0.21 (2024-04-09)

Bug Fixes

  • nextra-theme-docs: updated react-medium-image-zoom dep (a754b78)

Styles

  • disabled noPropertyAccessFromIndexSignature (#386) (2250c02)

Miscellaneous Chores

  • updated dev dependencies (bf2c635)

@visulima/nextra-theme-docs 4.0.20 (2024-03-30)

Bug Fixes

  • updated dev dependencies and react-medium-image-zoom (2bba6a9)

Miscellaneous Chores

Continuous Integration

@visulima/nextra-theme-docs 4.0.19 (2024-03-22)

Bug Fixes

  • nextra-theme-docs: tailwind-merge (c3dae67)

Miscellaneous Chores

@visulima/nextra-theme-docs 4.0.18 (2024-03-16)

Bug Fixes

  • nextra-theme-docs: updated next-themes dep (57a7cb1)

Miscellaneous Chores

  • updated dev dependencies (956b7b3)

Code Refactoring

@visulima/nextra-theme-docs 4.0.17 (2024-03-10)

Bug Fixes

  • nextra-theme-docs: fixed found type issue (e824ee6)

Miscellaneous Chores

  • nextra-theme-docs: added a new todo to fix a type (c3d8116)

Code Refactoring

@visulima/nextra-theme-docs 4.0.16 (2024-03-06)

Bug Fixes

Miscellaneous Chores

@visulima/nextra-theme-docs 4.0.15 (2024-03-04)

Bug Fixes

  • fixed all found type issues (eaa40d1)
  • minifyWhitespace on prod build, removed @tsconfig/* configs (410cb73)

Miscellaneous Chores

@visulima/nextra-theme-docs 4.0.14 (2024-02-26)

Bug Fixes

  • updated @giscus/react, next-seo and all dev deps (9a81746)

Miscellaneous Chores

  • changed all @types/node version to 18.18.14 (9aab8db)
  • deps: update dependency @types/node to v18.19.15 (3b3acec)
  • deps: update patch updates (dafdecb)
  • dev deps update (eeffd86)
  • update dev deps (4d9764d)
  • update dev deps (795feac)
  • update dev deps (c4e2508)
  • updated license (a140ef8)

@visulima/nextra-theme-docs 4.0.13 (2024-01-31)

Bug Fixes

Miscellaneous Chores

@visulima/nextra-theme-docs 4.0.12 (2024-01-19)

Bug Fixes

  • fixed flexsearch (d3408c8)
  • updated all deps, updated test based on eslint errors (909f8f3)

Styles

Miscellaneous Chores

@visulima/nextra-theme-docs 4.0.11 (2023-12-06)

Bug Fixes

  • updated tailwind-merge and dev deps (63e7779)

Styles

  • fixed found eslint and prettier errors (ed65aec)
  • fixed found prettier error (b3234c2)

Miscellaneous Chores

  • changed all vitest.config.ts files, to ignore fixtures folder (fa9c25a)
  • updated dev deps (a3e6124)

@visulima/nextra-theme-docs 4.0.10 (2023-11-30)

Bug Fixes

Miscellaneous Chores

@visulima/nextra-theme-docs 4.0.9 (2023-11-30)

Bug Fixes

Miscellaneous Chores

  • deps: update dependency next to >=13.1.6 (#260) (88e3b4f)

@visulima/nextra-theme-docs 4.0.8 (2023-11-07)

Bug Fixes

  • fixed the homepage url of the package (02075ce)

Miscellaneous Chores

  • adjusted build step for nextra theme (b737886)
  • changed url for packages (#249) (43f640f)

@visulima/nextra-theme-docs 4.0.7 (2023-11-02)

Bug Fixes

Miscellaneous Chores

  • added reportUnusedDisableDirectives to eslint (797d18f)
  • deps: update devdependencies (#229) (129de7b)
  • update dev dependencies (c1204b8)
  • updated dev dependencies (cf6d866)
  • updated dev dependencies (0dc7b1f)

@visulima/nextra-theme-docs 4.0.6 (2023-10-30)

Bug Fixes

  • update dependencies in pnpm-lock.yaml (d3a5626)

@visulima/nextra-theme-docs 4.0.5 (2023-10-24)

Bug Fixes

  • changed type to modules, fixed exports, fixed cs, fixed config for i18n to be optional (#232) (70a92b5), closes #227

@visulima/nextra-theme-docs 4.0.4 (2023-10-24)

Bug Fixes

Miscellaneous Chores

Continuous Integration

@visulima/nextra-theme-docs 4.0.3 (2023-10-15)

Bug Fixes

  • removed types from exports key (80bd356)

Miscellaneous Chores

  • updated package dependencies, updated to nx 17 beta (14db1c9)

@visulima/nextra-theme-docs 4.0.2 (2023-10-11)

Bug Fixes

@visulima/nextra-theme-docs 4.0.1 (2023-09-05)

Bug Fixes

  • deps: update package versions in pnpm-lock file (6917001)

Miscellaneous Chores

@visulima/nextra-theme-docs 4.0.0 (2023-08-29)

⚠ BREAKING CHANGES

  • changed exports path for the components and config

Features

  • fixed found design issues, adjusted search from right to left (#201) (3f28da2)

Bug Fixes

  • fixed wrong settings for node 18+ in typescript (ac6711f)
  • remove unused files and refactor imports and typings (ba2ab03)
  • updated various package dependencies and optimized code formatting. (5d71d91)

@visulima/nextra-theme-docs 3.0.0 (2023-08-28)

⚠ BREAKING CHANGES

  • update minimum Node.js version requirement to 18

Features

  • refactor query parsing and update dependencies (#203) (cf77427)

Miscellaneous Chores

  • update dependencies for various packages (b6054fa)

@visulima/nextra-theme-docs 2.3.0 (2023-08-14)

Features

  • update locale switcher code and component exports (ba80080)

Bug Fixes

  • updated documentation for better clarity and fixed broken links (d8ac8d1)

Documentation

Miscellaneous Chores

  • update dependencies to latest versions (cd7a3c1)

@visulima/nextra-theme-docs 2.2.1 (2023-08-02)

Bug Fixes

  • update sandbox component for Safari compatibility (4ad6df8)

@visulima/nextra-theme-docs 2.2.0 (2023-08-02)

Features

  • Add sandbox component and improve tabs component (aeb6378)

Styles

  • refine type checking and adjust eslint rules (8202d40)

Miscellaneous Chores

@visulima/nextra-theme-docs 2.1.0 (2023-08-01)

Features

  • Add 'React Live Editor' component to documentation (85d263c)

Styles

  • Add eslint-disable comment in LiveEditor component (a3b9bcd)

@visulima/nextra-theme-docs 2.0.0 (2023-07-31)

⚠ BREAKING CHANGES

Features

  • Add descriptive UI enhancements and test cases (9709302)
  • addd more docs, fixed some styling (baa7640)
  • added icon component to the sidebar, fixed meta schema (83767bc)
  • added image-frame (6456c51)
  • added more docs for the theme, fixed or extended callout, card and card-group, added accordion, accordion-group, fixed icons padding in sidebar, changed tabs to be easier to use (0106b86)
  • added toast example and extended theme config with toaster (ff70ed2)
  • deleted old files, fixed all eslint errors (71536f3)
  • removed newNextLinkBehavior option, added react-wrap-balancer on all header, exporting now zoom, and toast as component und hook, added new meta description config (dc4dd86)

Bug Fixes

  • Add an interactive state to the summary. Update lockfile and component folding. (4eec888)
  • Remove redundant scripts and tests, refactor some files for cleanup (256487a)

Styles

Miscellaneous Chores

  • added symlink, updating docs (c66583a)
  • updated deps, and changed semantic-release config to extend anolilab config (9dbe9e2)

@visulima/nextra-theme-docs 1.1.7 (2023-07-28)

Bug Fixes

  • Update eslint rules and dependencies (01a4bef)

@visulima/nextra-theme-docs 1.1.6 (2023-07-26)

Bug Fixes

  • "Update packages and refactor naming (1f0a4fc)
  • Add secretlintrc file. Update list routes tests and snapshots for different frameworks. (44105b9)
  • Update eslint-config version to 10.0.6 across multiple packages (391238a)
  • Update types with interface definitions and tweak code format (5f47682)

@visulima/nextra-theme-docs 1.1.5 (2023-06-10)

Bug Fixes

  • changed hr color to make it more visible, fixed code copy issue (#170) (48df12a)

@visulima/nextra-theme-docs 1.1.4 (2023-06-06)

Bug Fixes

  • update deps, to support latest nextra version (234db68)

@visulima/nextra-theme-docs 1.1.3 (2023-06-06)

Bug Fixes

@visulima/nextra-theme-docs 1.1.2 (2023-06-05)

Bug Fixes

  • moved the overflow-x-hidden out of the main css, fixed wrong color on nav in dark mode (2fbfc9f)

@visulima/nextra-theme-docs 1.1.1 (2023-06-03)

Bug Fixes

  • fixed broken toc-sidebar visibility check, fixed design of the footer with only one select dropdown, added missing translations for the locale-switch, fixed mobile menu didn't closed on resize (78578d4)

@visulima/nextra-theme-docs 1.1.0 (2023-06-01)

Features

  • added a new theme options to configure prose use on a page or doc page (6f77d8c)

@visulima/nextra-theme-docs 1.0.8 (2023-06-01)

Bug Fixes

  • removed not needed classes from all typography elements (71fd20a)

@visulima/nextra-theme-docs 1.0.7 (2023-05-30)

Bug Fixes

  • added new gitignore file, with component-style.css and style.css (5fd3f22)

@visulima/nextra-theme-docs 1.0.6 (2023-05-30)

Bug Fixes

  • nextra-theme-docs: updates theme to be nextra compatible (#87) (b9fbeb2)

@visulima/nextra-theme-docs 1.0.5 (2023-05-25)

Bug Fixes

  • fixed all calls to radar with sonarjs, removed radar eslint package (001aecf)
  • fixed nextra doc theme to support newest version (ef62092)
  • updated package deps (5f605aa)

@visulima/nextra-theme-docs 1.0.4 (2023-01-25)

Bug Fixes

  • updated tsconfig to use module esnext and target es2021 (#107) (e888fe8)

@visulima/nextra-theme-docs 1.0.3 (2023-01-08)

Bug Fixes

  • allow higher node versions (c93d55b)
  • allow higher node versions (faf4780)

@visulima/nextra-theme-docs 1.0.2 (2022-12-12)

Bug Fixes

  • nextra-theme-docs: moved details and summery out of mdx componen… (#56) (7cdcc99)

@visulima/nextra-theme-docs 1.0.1 (2022-12-10)

Bug Fixes

  • nextra-theme-docs: fixed visibility of meta info in content (e1d27b3)

@visulima/nextra-theme-docs 1.0.0 (2022-12-10)

Features

  • nextra-theme-docs: new nextra theme doc (#52) (8458be4)