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.
430
questions
0
votes
1
answer
140
views
How to configure docusaurus config keys conditionally?
If a user needs to configure an optional docusaurus config key based on some condition, what is the best way to address it in docusaurus.config.js file? For example:
module.exports = {
/* If ...
2
votes
1
answer
125
views
Katex rendering equations multiple times
I am using Docusaurus to generate a static website. I integrated katex using the official instructions (https://docusaurus.io/docs/next/markdown-features/math-equations).
I want to render this:
$$
\...
0
votes
1
answer
225
views
I can't get a page to show on Docusaurus. What am I doing wrong?
I've been configuring a local site I built via Docusaurus, and I can't get to show the About page. I made sure the links are correct, but I keep on getting an error. I feel like I just overlooked ...
0
votes
0
answers
344
views
Docusaurus: change content of the right sidebar
I'm customizing my blog/documentation site from Docusaurus and so far it's been a breeze.
Now, in the doc pages, I'd like to get the automatically generated sidebar of the right (the one for internal ...
0
votes
0
answers
191
views
Is it possible to auto generate docusarus sidebars from i18n folder?
As far as I understand, sidebars can only be auto generated from the /docs folder, and as I'm using docusaurus v2 the docs translations will allow me to use different filenames and slugs, but it's ...
0
votes
1
answer
149
views
Docuaurus having both side bar and burger menu on screen at once
When you reduce the width of a Docusaurus site below 996px the sidebar becomes a burger menu in the nav bar.
Goal: We want that burger menu to be shown on all pages regardless of the size of the ...
5
votes
2
answers
1k
views
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 ...
1
vote
1
answer
187
views
Get a list of all pages from `docs` directory?
I am trying to implement a "Get random page" link in Docusaurus. For that I would like to get a list of all available pages/page ids+path from the docs/ directory.
Does Docusaurus have a way ...
0
votes
0
answers
17
views
Is there a way to disable onPageNav or secondary sidebar for a specific page on Docusaurus? [duplicate]
I don't want the secondary sidebar on some markdown pages created from /pages directory. Is is possible to achive that?
0
votes
0
answers
24
views
Two doc pages in docusaurus [duplicate]
I'm using Docusaurus and I would like to have two different docs pages: one for documentation and one for API. This is my files structure:
docusaurus.config.js
themeConfig:
/** @type {import('@...
0
votes
0
answers
65
views
How to display the first level title in the left sidebar
When there is only one markdown in the doc page, the left sidebar of the page is the primary directory of markdown, and the right sidebar is the subdirectory of the current primary directory. How can ...
0
votes
0
answers
12
views
Override styles and scripts for specific page
Is there a way I can avoid Docusaurus from injecting styles and scripts for a specific page? I have a use case where I'd like to render a legacy html that has it's own styles / scripts, but Docusaurus'...
1
vote
0
answers
335
views
Docusaurus: Wrapping custom root in ChakraProvider breaks my mdx pages
I'm building a site with Docusaurus and want to use some Chakra-UI components in my code. Chakra-ui requires wrapping the root of any app in a ChakraProvider component (for instance, in an ...
1
vote
0
answers
32
views
Can the same version support multiple routing path?
Can the same version support multiple routing path
versions: {
current: {
path: '1.1.2',
},
'1.1.1': {
path: 'latest',
},
...
0
votes
0
answers
106
views
This page crashed. when I use named docusaurus-search-local,Then I run npm run start,It's been error,The page becomes like this
enter image description here
when I use named docusaurus-search-local,Then I run npm run start,It's been error,The page becomes like this
0
votes
1
answer
302
views
Resize images in markdown files for websites built usign Docusuarus
I am trying to build a documentation website for a project. The images I am using are large in size and I'd like to resize them using the HTML tag style="zoom:33%;". However, on running the ...
2
votes
0
answers
171
views
Can I include / exclude content in mdx file based on a variable set at build time?
I am enjoying using Docusaurus, it is a nice change for me. I am using Docusaurus v2.18. I would like to be able to build two different sets of docs from one set of source files. There will be some ...
1
vote
2
answers
361
views
Docusaurus import @site alias unresolved in IntelliJ
I just created a Typescript Docusaurus website.
I know docusaurus has webpack aliases for React components imports (@site, etc), but IntelliJ cannot recognise these imports: i.e. Ctrl+B on the type ...
1
vote
0
answers
312
views
How To Debug Failure to Scroll to Fragment ID in Chrome?
I have a page which defines some DOM elements with fragment ids:
<h2 id="foo">...</h2>
And I have some anchors on the page that reference these id's:
<a href="#foo"&...
0
votes
0
answers
89
views
Embed a p5.js sketch on a Docusaurus docs markdown page
We are using Docusaurus as a documentation portal. We would like to help illustrate some concepts with Processing (p5.js).
How can we embed a p5 sketch in a Docusaurus docs page?
0
votes
0
answers
115
views
How can I embed a snippet before the closing </body> tag in Docusaurus?
I want to install this snippet immediately before the </body> tag on my Docusaurus site.
<script type="text/javascript">
window._mfq = window._mfq || [];
(function() {
...
0
votes
0
answers
35
views
Random assets/js/main.js created each build
I have a typescript project and I'm trying to use docusaurus to publish the tsdoc.
The issue I have is that, after running npx docusaurus build, even if there are no actual changes in the ".md&...
1
vote
0
answers
105
views
Is there a way to include common terms in markdown as placeholders/variables in Docusaurus
I'd like to have some placeholders in my documents that are not translated but used across many documents as variable. For example product name in all documents should be defined globally for easy ...
0
votes
0
answers
50
views
docusaurus - trying to implement an on-page calculation tool
I would like to implement an on-page calculation tool into one of my docusaurus articles - I'm not a super coder so I'm sticking to basic html using form, input and output.
currently looks like this
&...
0
votes
2
answers
1k
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 ...
1
vote
0
answers
252
views
Docusaurus Build and Deployment with GitHub Actions
I made a GitHub action in order to build and deploy my docusaurus site on a GitHub page following the docusaurus documentation.
When I make a modification in one of my project file, the GitHub action ...
0
votes
1
answer
115
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
395
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
0
answers
309
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 ...
0
votes
0
answers
52
views
how to automatically add .md files to sidebar.js file using tags or something similar
I'm a new user of GitHub and Docusaurus.
Our current system is to have specific articles listed as .md files and then manually paste the .md file slug to our sidebar.js file so we have a visible ...
1
vote
0
answers
76
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
0
answers
54
views
Multiple GitHub accounts on same computer but can't deploy Docusaurus website to GitHub pages using personal account
I have two GitHub accounts set up on my computer. I followed the steps as defined here to create multiple SSH keypairs. I am able to work on multiple repos from different GitHub accounts.
Using my ...
0
votes
1
answer
282
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
390
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
79
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
109
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
455
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 ...
0
votes
0
answers
49
views
Unable to resolve duplicate header in Docusaurus MD File
I dont understand why two headers are coming on my MD pages. I dont want "intro" header written.
also, in my sidebar, the pages are fetching the md file name rather than its name. I have ...
3
votes
0
answers
72
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 ...
1
vote
2
answers
651
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
40
views
How to get --ifm-z-index-fixed: 200 on production mode in docusaurus
After I run docusaurus build, I can see --ifm-z-index-fixed:4; in build/assets/css/styles.51d19aa2.css
When I run docusaurus start, I can get correct value --ifm-z-index-fixed: 200.
This variable ...
0
votes
0
answers
58
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
311
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
188
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
1
answer
814
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
265
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
643
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
401
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
223
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
357
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 ...