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.

Filter by
Sorted by
Tagged with
22 votes
7 answers
9k views

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: ...
Echo Yang's user avatar
  • 490
24 votes
5 answers
8k views

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 ...
SoftTimur's user avatar
  • 5,384
17 votes
2 answers
10k views

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 ...
Mahdi-Malv's user avatar
  • 17.3k
14 votes
6 answers
8k views

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 ...
Mark Underseth's user avatar
2 votes
2 answers
3k views

Is there any way to render a html file in a markdown post with Docusaurus?

I am trying to convert a blog from Jekyll to Docusaurus and am having an issue figuring out how to render an HTML file from within the markdown post. In Jekyll, I am able to do so like so: {% include [...
Austin Sharp's user avatar
4 votes
2 answers
5k views

Custom Search Bar in Docusaurus 2

I'm just experimenting with Docusaurus V2, i want o enable offline search witth LUNR(https://lunrjs.com/) Search, like described, in this blog. https://v2.docusaurus.io/feedback/p/offline-search i ...
dc-deal's user avatar
  • 322
3 votes
2 answers
1k views

Adding external javascript to document page in Docusaurus v2

I'm building a component library of just HTML snippet and corresponding js/css and I'm using Docusaurus to document those compoents. I have a document page for each component. On the document page ...
evans863's user avatar
3 votes
4 answers
3k views

Deploy an Express server that uses express.static to serve a build folder to Vercel

I've implemented an express server that uses express.static to serve the build folder created from a static docusaurus site in order to apply basic authentication to access the site. This is working ...
Alyssa De Metro's user avatar
2 votes
3 answers
3k views

Is there a way to exclude paths within docs directory in docusaurus?

I want to exclude a subfolder from the docs/ directory from generating doc pages. customDocsPath is a related option but it's a string. Is there by any chance some undocumented option that accepts ...
Elian Ibaj's user avatar
2 votes
1 answer
361 views

Docusaurus fails with IE: Object doesn't support property or method 'assign'

We are making a V2 Docusaurus website: https://www.10studio.tech. We have just realized that it does not work well in IE, for instance, IE11. The error message is: Object doesn't support property or ...
SoftTimur's user avatar
  • 5,384
2 votes
2 answers
5k views

How to add or remove the "open" attribute from all details tags in a react component?

I have a page with a React component that uses multiple detail/summary tags: const React = require("react"); class samplePage extends React.Component { render() { const siteConfig = this.props....
Lichtung's user avatar
  • 133
2 votes
2 answers
376 views

How to create buttons that will show / hide the state of all detail tags in a Docusaurus project?

Following from the discussion here and here, I'd like to create two buttons that will show / hide the state of all detail tags in a Docusaurus project. Currently, the best candidate code I have for ...
Lichtung's user avatar
  • 133
1 vote
1 answer
593 views

How can I get ESLint to recognize Docusaurus aliases?

The Situation I'm working on a Docusaurus project which will include some custom components. I'd like to also use ESLint, and in particular the AirBnB config. When I run the linter on the initially ...
slifty's user avatar
  • 13.1k
1 vote
1 answer
301 views

ESLint not recognising Docusaurus aliases when using Typescript?

I'm working on a Docusaurus project running TypeScript/ESLint. More specifically, I have the rule: { 'import/no-unresolved': 'error', } I have got the setup: "devDependencies": { &...
CeraMix's user avatar
  • 111
0 votes
0 answers
65 views

Spaces are missing in the layout

I coded the following code in .md: ```bash =AND(a,AND(b,c,d),e) => =AND(a,b,c,d,e) ``` However, the spaces before =AND(a,AND(b,c,d),e) are missing: Does anyone know how to amend this?
SoftTimur's user avatar
  • 5,384
0 votes
1 answer
4k views

How to use the useState() hook to open / close all detail tags In ReactJS? [duplicate]

I have a useState() hook to assert or deny the open (isOpen) attribute of 3 detail tags and also 2 button(s) to control the hook, all wrapped in a div: const {useState} = React; const ...
Lichtung's user avatar
  • 133
0 votes
2 answers
697 views

How to employ the useState() hook with config props in a Docusaurus project?

I'm working with Docusaurus, which provides a siteConfig.js as a config props. As such, I have to use this props to build my site components. Working code is formatted like this: const React = ...
Lichtung's user avatar
  • 133
0 votes
2 answers
1k views

Docusaurus build missing fonts

I load the custom font with the location in the static/fonts folder, it works fine when in development mode (docusaurus start), but when I build (docusaurus build), the results show that the fonts I ...
SupianIDz's user avatar
0 votes
1 answer
658 views

Where do I control sitemap for Docusarus?

I've checked docusurus.config.js and I can not see that sitemap plugin is installed but sitemap.xml exists in build directory. What defines parameters how is sitemap generated?
KWriter's user avatar
  • 1,056