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
24
votes
4 answers

How can I add custom scripts in index.html's head part in Docusaurus V2?

We are making a website with Docusaurus V2. In Docusaurus V1, there is a scripts setting in siteConfig.js to cusutimize html's head content. But, I cannot find the corresponding setting in Docusaurus V2. According to…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
21
votes
7 answers

Is there a way to have two docs in Docusaurus 2?

As I know, Docusaurus supports customized pages, but is there a way to have two docs in one Docusaurus project? The original Navbar items have: Docs Blog ... I want to have something like this: Docs 1 Docs 2 Blog ... I know I can make many…
Echo Yang
  • 470
  • 5
  • 12
18
votes
3 answers

Vertical bar symbol within a markdown table

Markdown tables use vertical bars as field separators, but I need to write a vertical bar within some cells. Is this possible? I'm using GFM (GitHub Flavored Markdown). Can I escape the vertical bar somehow? This is not on GitHub, it's through…
at.
  • 50,922
  • 104
  • 292
  • 461
17
votes
2 answers

Change image size in Docusaurus

I'm using Docusaurus to make documentation. I want to add an image to a markdown file, and also resize it to prevent it to be larger than needed. Checking This answer, I realized this is possible using static html content in the md file, but since…
Mahdi-Malv
  • 16,677
  • 10
  • 70
  • 117
14
votes
6 answers

Docusaurus 2 inclusion of a video file in a markdown file

Using Docusaurus for help documentation. I can include images, gifs, and reference a youtube video (use iframe). But it is not clear to me how to include a video in a markdown file. I am expecting the video to be in my repo (i.e.…
Mark Underseth
  • 143
  • 1
  • 6
12
votes
2 answers

Markdown content in tabs using Docusaurus v2

I try to add markdown code inside a Tab, as explain the documentation. The name file name has .mdx extension. Here its content: import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
angelcervera
  • 3,699
  • 1
  • 40
  • 68
12
votes
6 answers

Is it possible to detect if docusaurus is in light or dark mode?

I have an image with a white background, which looks off on docusaurus dark theme, so I want to detect when the user changes theme so I use a different image.
11
votes
2 answers

Docusaurus - How to remove TOC(table of contents)?

I'm using docusaurus for our dev docs. How to disable TOC? Thanks.
Dorr
  • 577
  • 1
  • 8
  • 22
10
votes
3 answers

Is it possible to support visitor comments in Docusaurus?

I'm building a website using Docusaurus 2. My website will contain docs and blogs. I wonder if it is possible to let visitors comment below an article? I guess, if we support comments, we need an authentication system for the website too. If the…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
9
votes
1 answer

Is it possible to disable JSX validation on docusaurus v2?

I have a website in docusaurus v1 that I am migrating to v2. It has several docs in .md format with embedded HTML tags. After the migration, the website won't load due to invalid tags. Is it possible to disable this JSX validation in v2 and have…
ThiagoAlves
  • 1,313
  • 16
  • 25
9
votes
6 answers

How to pass env var to Docusaurus v2

I've been trying to get environment variables to work in my documentation build. I've had some success with adding a dotenv-webpack plugin and substituting values that way. This has the downside of needing a .env file of some kind I would like to…
dingdingding
  • 1,411
  • 1
  • 15
  • 23
9
votes
3 answers

Possible to publish docusaurus cross-repo from multiple-repositories, to aggregate docs together?

My question: Are there any docusaurus features out of the box (beyond https://github.com/facebook/docusaurus/pull/764) that will make the following easier? (I've asked this here because their github question template tells me issues of that type…
Peter Mounce
  • 4,105
  • 3
  • 34
  • 65
8
votes
3 answers

How do I embed global React components in Docusaurus v2?

I see that it is possible to embed React components with MDX: https://v2.docusaurus.io/docs/markdown-features/#embedding-react-components-with-mdx However, this method works for a specific page. How can I make it work for all markdown files in the…
Onur Zobi
  • 81
  • 5
8
votes
3 answers

Docusaurus v2 collapsible section in markdown

Is there an easy way to create a collapsible section in Docusaurus V2 markdown? Would look for something similar to this on GitHub: https://gist.github.com/joyrexus/16041f2426450e73f5df9391f7f7ae5f
dakami
  • 319
  • 2
  • 10
7
votes
2 answers

How to add a Docusaurus website within Next.js Website as a route

Does anyone have any pointers on how to go about adding a /docs page for website documentation to a next.js app? I've looked up Docusaurus but it seems like it's already a react app itself. Is there a way to integrate it inside an existing next.js…
Bhupendra
  • 1,196
  • 16
  • 39
1
2 3
31 32