Questions tagged [docusaurus]

Docusaurus is a modern static site generator focused on documentation. It helps you to focus on your content and build optimized websites quickly.

Docusaurus is a performant static site generator by Facebook and can be used to create common content-driven websites (e.g. Documentation, Blogs, Product Landing and Marketing Pages, etc) extremely quickly. Its features:

  • Write using Markdown - Save time and focus on your project's documentation. Simply write docs and blog posts with Markdown and Docusaurus will publish a set of static html files ready to serve.
  • Built using React - Extend or customize your project's layout by reusing React. Docusaurus can be extended while reusing the same header and footer.
  • Translations - Localization comes pre-configured. Use Crowdin to translate your docs into over 70 languages.
  • Versioning - Support users on all versions of your project. Document versioning helps you keep documentation in sync with project releases.
  • Search - Make it easy for your community to find what they need in your documentation. We proudly support Algolia documentation search.

Useful Links

477 questions
3
votes
1 answer

Minified React Error #321 with Docusaurus v2

I am trying to deploy Docusaurus v2 and I keep getting this error: Creating an optimized production build... √ Client Compiled successfully in 18.44s × Server Compiled with some errors in 20.74s Error: Minified React error #321; visit…
Max
  • 31
  • 2
3
votes
1 answer

How to support changes in older versions of docs maintained by docusaurus

I'm trying out Docusaurus tool for creating a documentation site. So far everything is okay until I came to Versioning. My understanding is that: Whatever is in your /docs/**/*.md is your latest docs for next release Previous versions of your docs…
aver
  • 555
  • 2
  • 7
  • 21
3
votes
1 answer

How to change the breakpoint for slidingNav in Docusaurus

I have just two header links in my Docusaurus site: Docs & GitHub. I would like to have these links remain in the header until I shrink the browser down to 500px. Unfortunately, the links slide down as soon as the browser shrinks to 1024px. How can…
Naresh
  • 23,937
  • 33
  • 132
  • 204
3
votes
3 answers

Custom Login page in Docusaurus

I have a task at work, It is to implement the login page inside the Docusaurus. I am trying to customizing the index.js by adding some HelloWorld. Including login.js which has actual Docusaurus Index page const Index = require('./login.js'); const…
Srini
  • 489
  • 1
  • 11
  • 25
2
votes
0 answers

Docusaurus: Make a shared links template for all pages

What I want to accomplish In docusaurus I want to have a single file where I can declare all the links in my docs, preferably using links to the md file that are processed by docusaurus. Description of my issue This is my first time working with…
Omar Yafer
  • 823
  • 6
  • 17
2
votes
0 answers

Can you embed Docusaurus inside a larger ReactJS project?

I have a ReactJS web application project, with an auth flow, dashboard, etc. However, I would also like to have a public "Guide" section of the site. To speed development time, I would like to create that Guide/Docs section with Docusaurus. Does…
2
votes
1 answer

How can I integrate AdSense into my Docusaurus project for monetization?

I'm working on a Docusaurus project hosted on GitHub at https://github.com/Ajay-Dhangar/CodeMastermindHQ. I want to integrate Google AdSense into my website to monetize it. However, I'm facing issues with the integration and need some help. I have…
2
votes
0 answers

Docusaurus: Creating Headings in javascript file, which also show up in the table of content

I want to export a react component, that contains a heading which is suppose to show up in the table of content aswell. My first idea was to use the docusaurus Heading component, which sizes the heading correctly and creates a link, but it still…
Pandabotu
  • 21
  • 3
2
votes
2 answers

How to synchronise dark/light mode between Docusaurus and MaterialUI?

I am new Docusaurus user, trying to synchronise Docusaurus dark/light mode with MaterialUI's dark/light mode. For example, when the toggle switch is changed from light to dark mode in Docusaurus then dark mode should be activated in MaterialUI. My…
anon_dcs3spp
  • 2,342
  • 2
  • 28
  • 62
2
votes
2 answers

How do I customize the a generated-index page in Docusaurus?

I have a generated-index page and I can see how to customize the on page title and description in the category.json for the directory, but is there a way to customize the items that are generated by the files that are in the same directory? for…
NoSQLKnowHow
  • 4,449
  • 23
  • 35
2
votes
1 answer

How do I change the light/dark mode icon in Docusaurus?

Docusaurus has a nice, minimal sun and moon for their light/dark mode button: https://docusaurus.io/ But our Docusaurus page automatically uses a toggle button that shows the moon emoji and the sun emoji . They're cute, but don't fit with our…
2
votes
0 answers

Cannot build docusaurus website from Docker

Hi all I have this Dockerfile: FROM node:16.14-alpine as build RUN npx create-docusaurus@latest project classic WORKDIR /project COPY ./docs/docusaurus/* docs RUN npm run build FROM nginx:1.17.4-alpine as serve RUN echo $'server { \n\ listen…
Fulvio
  • 87
  • 7
2
votes
1 answer

Import and show file content in MDX code blocks

I'm using Docusaurus to build doc. Docusaurus use MDX. I would like to show a .json file in the doc using a code block without needing to copy/past the file content. Instead of writting this in my md doc: Let see the content of the `helloworld.json`…
2
votes
1 answer

How to add AdSense's Ad Unit to the body of a web page built with Docusaurus

Is it possible to add AdSense's ad unit to the body of a Docusaurus web page? Whenever I paste the Display ad unit code into a markdown page of my site, the browser throws "Uncaught SyntaxError: expected expression, got end of script". BTW, I am not…
2
votes
1 answer

Local docusaurus plugins in typescript

I want to write local docusaurus plugins using typescript. (it works fine using js) Is this possible? Like the docs here suggest to put them under ./src/plugins/name-of-plugin. Reading the docs there are examples with ts, but if I just try and…
Gustav
  • 3,408
  • 4
  • 24
  • 41