Home > Web Front-end > JS Tutorial > body text

Generate a documentation site using Nextra

Susan Sarandon
Release: 2024-11-08 20:58:02
Original
434 people have browsed it

In this article, you will learn how Nextra can be used to generate a static documentation site and we also provide an example.

Using Nextra, you can make beautiful websites with Next.js & MDX.

Nextra docs provides two options, one for documentation and the other is for blog.

Using Nextra

Configuring Nextra manually is simple. You install the packages, update the Next.js config, create themes.config.jsx and finally create pages/_app.jsx

There is an important FAQ found on Nextra about using Nextra in app router, it is not supported yet but Next.js supports both app and

pages router in the same app.

Unofficial changesets documentation site

This repository is an unofficial changesets documentation site. It is deployed on Vercel and available at — https://changesets-docs.vercel.app/

Generate a documentation site using Nextra

// next.config.mjs
import nextra from "nextra";
const withNextra = nextra({
 theme: "nextra-theme-docs",
 themeConfig: "./theme.config.jsx",
 defaultShowCopyCode: true,
});
export default withNextra({
 i18n: {
 locales: ["en-US", "zh-CN"],
 defaultLocale: "en-US",
 },
});
Copy after login

About us:

At Thinkthroo, we study large open source projects and provide architectural guides. We have developed reusable Components, built with tailwind, that you can use in your project. We offer Next.js, React and Node development services.

Book a meeting with us to discuss your project.

Generate a documentation site using Nextra

Reference:

  1. https://nextra.site/docs/docs-theme/start

  2. https://github.com/nnecec/changesets-docs

  3. https://changesets-docs.vercel.app/

The above is the detailed content of Generate a documentation site using Nextra. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template