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.
450
questions
0
votes
1
answer
147
views
Different versions of configuration files on remote github repositories (staging/production)
I am setting up a documentation website, using GitHub Pages + Docusaurus (static website generator).
There are two github repositories involved: "DOCS" for the staging version of the website ...
1
vote
1
answer
455
views
I am unable to render Math in docusaurus
Reading the documentation, I have followed all the steps. With my docusaurus.config.js files here.
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion
const ...
0
votes
1
answer
415
views
Docusaurus: Cannot find module "@docusaurus/router" when running Jest
I am trying to setup unit tests for our Docusaurus instance. I am unable to load any of the Docusaurus modules during testing. Another user had the same issue and his fix does allow me to get past the ...
1
vote
0
answers
90
views
How to use docusaurus with Fluent UI?
I am now working on Docusaurus (which is a static site generator) with Fluent UI, and I don't know how to setup SSR for Fluent UI, there's no any useful information on Internet.
What I've known:
...
0
votes
1
answer
324
views
Only apply Bootstrap CSS to certain children components
I have several components of Website A (e.g., a customized form) built in Bootstrap. I have Website B build in Docusaurus. Now, I would like to copy these components to Website B. As Bootstrap and ...
1
vote
0
answers
424
views
Using react-freezeframe with docusaurus static page render error
I'd like to add react-freezeframe to my docusaurus project. I was able to import it in my markdown code and also when previewing the page on the local webpack dev server freezeframe is working fine ...
0
votes
1
answer
88
views
Do I need to build the whole project every time if I wrote a blog or doc when using Docusaurus?
I think it's crazy to build and re-deploy the whole project when I just changed a word in my blog.
0
votes
1
answer
159
views
Disable minification in docusaurus?
I see the flag to disable minification for Docusaurus, but the flag only appears to work for docusaurus build and not for docusaurus start. Is there a way to do something equivalent when running ...
0
votes
1
answer
575
views
How do I add a button to the navbar?
I've just started using Docusaurus and I want to add a Sign Up button to the navbar (yes, I know that it's for documentation only). I have tried swizzleing the componenets but I've had no luck. I ...
3
votes
0
answers
81
views
Any way to create page preview on hover?
In our docusaurus knowledge base we are building we are wanting to do some Wikipedia-style page preview effects on hover. I've seen a few ways to do it, but not any that would work in Docusaurus. Is ...
2
votes
2
answers
812
views
Brief HTTP 404 error on all pages in /docs
I recently deployed our Docusaurus site for the first time and I am running into a weird issue with routing.
Every page in the /docs folder will briefly render the 404.html page when hitting the page ...
0
votes
0
answers
72
views
Providing different variants/flavors of content
I'm using Docusaurus to write tutorials for my company's platform (https://petrbroz.github.io/forge-samples-docs/docs/intro), and I'm providing multiple language/IDE variants for each tutorial. Right ...
1
vote
0
answers
349
views
How to link a static HTML file not generated by Docusaurus?
I use docusaurus and I want include static html page generated by an other part of my environement.
Online: https://stackblitz.com/github/facebook/docusaurus/tree/starter
/src/pages/helloReact.js
...
1
vote
0
answers
199
views
I want to add react code into markdown files
I have a static website generated by Docusaurus and I added firebase authentication it works fine but the path to my markdown files still not secured (everyone can access it without authentication). ...
1
vote
2
answers
984
views
Can firebase authentication work with docusaurus?
I want to use authentication service given by Firebase in my static website created by Docusaurus. is this possible ?
Thank you in advance
1
vote
1
answer
301
views
How to add Twitter card image to individual documentation page?
Is it possible to add a Twitter card image to the individual documentation page? I know that I can use Meta image in docusaurus.config.js but this is a site-wide setting.
-1
votes
2
answers
910
views
How to link downloadable files in docusaurus?
I want to link downloadable content on my documentation and I tried putting in a link like this:
<a
href={
require("@site/static/img/04-api/01/API-Description.png")
.default
...
1
vote
1
answer
494
views
How do I customise the 404 page?
I would like to know how to change the text on the 404 page to be custom not the generic message. How would I go about this? The standard 404 page looks like
this.
1
vote
0
answers
236
views
How to add and id to an element in docusaurus?
They explain it on their docs, but it's only for headings headings
I've also read, that normally this is archived (in vanilla md) like this [Some Text](/some/text/etc){#ID}, but in Docusaurus this ...
0
votes
1
answer
444
views
Docusaurus links navigate to other pages but not to specific anchors
In a folder structure like this:
|- docs
|- folder
|- file_1.md
|- file_2.md
I have links like this:
In file_1.md: [File 2 Anchor](file_2.md#file-2-anchor)
In file_2.md: [File 1 ...
0
votes
0
answers
37
views
How do I reinstalling docusaurus 2.0.0-beta.15
I am have problems with 2.0.0-beta.16 failing to build on Cloudflare. How do I reinstall 2.0.0-beta.15
0
votes
1
answer
165
views
Custom protocol for Docusaurus
We want to serve a Docusaurus-build with Electron.
For this we are using a custom protocol that just serves the files to the Electron-Browser.
The Problem is, the Javascript that is running in the ...
0
votes
2
answers
765
views
Problem with componentDidMount and Docusaurus
Currently, I am building a react app with Docusaurus and I am having a problem building the app. The error message says:
[0] [ERROR] Docusaurus Node/SSR could not render static page with path /...
0
votes
1
answer
2k
views
How to modify custom.css styling on Docusaurus items
I am looking for the syntax needed to reference an item in Docusaurus allowing me to modify the background color/text color of a collapsed item.
Example image
enter image description here
How exactly ...
0
votes
0
answers
308
views
How to run docker and node together?
I want run docusaurus with docker which containing nginx and node.
My directories looking like this. Without docker docusaurus working correctly
application/
blog/
docs/
src/
static/
...
0
votes
1
answer
329
views
make a code preview for documentation with Reactjs
I'm trying to create a component who display source's code passed as props to write documentation of a library i work on with Docusaurus. Like html <code> or exactly like this (the blue part) :
...
1
vote
1
answer
394
views
Docusaurus: npm run serve reloaded page not rendered
I have a docosaurus page running. It works fine. I use
'npm run build'
and
'npm run serve'
to deploy it. The app runs fine, but when I go to any page that is not on root and I refresh it, I get:
Index ...
1
vote
1
answer
1k
views
Docusaurus: command not found when running npm run start to host the server
npm run start
balboa@0.0.0 start
docusaurus start
sh: docusaurus: command not found
This is what shows when trying to follow the guide on how to run the local development server.
Any ideas?
4
votes
2
answers
841
views
On Docusaurus, how do I disable the external link SVG?
I'm trying to implement Sign in and Sign up buttons on the Docusaurus navbar...
...but since my app is in a subdomain, Docusaurus thinks they are external links and adds this ugly SVG.
How do I ...
1
vote
0
answers
64
views
style isolation in docusaurus
docusaurus is a very useful tool, I love it, we are creating our own component library, the demo of the component library, and eventually rendering in docusaurus, but I found a problem, some of the ...
0
votes
2
answers
1k
views
Docosaurus: How can you hide Copy button next to the code example?
I want to do the opposite from https://gist.github.com/yangshun/55db997ed0f8f4e6527571fc3bee4675.
Can I somehow hide the Copy button from individual Code block (https://docusaurus.io/docs/markdown-...
1
vote
0
answers
218
views
How to get the color and background color in docusaurus programatically?
I'm using a Chart component from react-google-charts and I'd like to put it in a mdx page and adjust its colors to the page colors. What's the best way to get the color and backgroundColor?
Here is my ...
0
votes
1
answer
667
views
How to proxy request in Docusaurus v2?
I'm trying to config my Docusaurus web app to proxy the request to my api endpoint. For example, if I make a fetch request in my app fetch(/api/test), it will proxy the request from localhost:3000/api/...
0
votes
0
answers
169
views
Issue when deploying on GitHub pages
I tried to host a project docs made with docoraus on GitHub with the name user.github.io. and in my vs it said
Successful hosted on https://user.github.io
And I own a domain with the same name as my ...
1
vote
0
answers
692
views
Docusaurus build fails with "sharp" module issue
Upon yarn build my projects fails to build. I've tried recommended options, but nothing works and error returns every-time. The project works upon using yarn start, just the build doesn't work
[ERROR] ...
0
votes
1
answer
344
views
how to switch the theme of self created react page by click the switch button on the nav bar
Already Wrap my page with
When switch the button, the color of nav bar changes, but not the page content.
I can change the content theme by importing the following files from ant design;
import 'antd/...
1
vote
0
answers
50
views
How to change DesktopThresholdWidth in Docusaurus?
Right now it seems like the desktop breakpoint is hard-coded to 996 (see here). Is there a way we could override this?
2
votes
0
answers
475
views
Integrate C++ documentation into docusaurus
I have a large code base that I do want to document with docusaurus. I used doxygen for the project before but I like docusaurus more now. Is there a way to integrate the C++ functions/classes/methods ...
0
votes
0
answers
552
views
Is it possible for Docusaurus to work with styled-components?
Docs for the possibility of styling components by css-in-js libraries are empty
https://docusaurus.io/docs/styling-layout#css-in-js
0
votes
1
answer
1k
views
Docusaurus 2 App trying to resolve dev dependencies
I have a Docusaurus 2 (using version 2.0.0-beta.9) app where I'm using msw to write a few tests. The tests work fine the problem is that when running npm start (which runs docusaurus start), I'm ...
2
votes
0
answers
223
views
DocuSaurus - Automatic JavaScript documentation
Is there a plugin or library that can be used to convert JavaScript code and comments into documentation in DocuSaurus?
The only option I found was using jsdoc-to-markdown, and I would like to know if ...
1
vote
1
answer
465
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 ...
2
votes
0
answers
354
views
Docusaurus MDX - create links with a version variable
I'm using Docusaurus for building a documentation web-site for a project. The content is written as MDX files. Since the project has different versions I'd like to use links that contain the specific ...
-1
votes
2
answers
90
views
Apply height 100% to all parent elements
I'm trying to get a div in the homepage to fill 100% of the height it can occupy.
I've tried different solutions like applying height: 100% to the body or all the divs etc. but none of it worked.
A ...
2
votes
2
answers
203
views
docusaurus links on google app engine give SEO problems
I have set up a website using docusaurus which works great, but when I check the indexing status of my website on google, I got a lot of 'Discovered - currently not indexed' problems, which appears to ...
1
vote
1
answer
696
views
Can't embed a CodeSandbox iframe into Docusaurus document
I can't figure out what's causing it, but I've been able to embed a youtube video iframe, but for some reason, the CodeSandbox iframe keeps causing a build error and it won't work. Are there some ...
1
vote
3
answers
1k
views
How to change the background image on your landing page in Docusaurus?
I would like to change-replace the default (green) background image shown on my Docusaurus landing page.
Is there a way to do this in a simple way, given that I have limited experience with CSS & ...
0
votes
1
answer
177
views
how to remove locale dropdown Icon(icon before english word)
I want to remove the icon in the language dropdown. I just want the text. Is that possible?
locale dropdown
1
vote
1
answer
735
views
Docusaurus theme/Layout module cannot be found by Jest
I am using Docusaurus to build a documentation site. In one of the react plugin page, I am using import Layout from '@theme/Layout'; from https://docusaurus.io/docs/using-themes
However, the module ...
1
vote
2
answers
824
views
Collapse sidebar (Table of Contents, left side) section
How can I add the 'Collapse sidebar' button to my own Docusaurus website, as shown below?