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.
322
questions
0
votes
1
answer
26
views
Algolia DocSearch in Docusaurus doesn't bring any results
my docs-site got approved from Algolia and their crawler also was able to index a few hundred records there, so that side seems to work.
In my docusauras.config.js I have added the following under ...
0
votes
0
answers
17
views
Question on messages from the typesense/docsearch-scraper
We are hosting typesense on WSL where ubuntu is installed. We are trying to implement this as the search engine for our large documentation site. Typesense seems to be installed properly. When the ...
0
votes
0
answers
17
views
How to omit "index" entry from an autogenerated Docusaurus V2 sidebar
At work we have a basic Docusaurus v2 page for user documentation, and I can't share it for privacy reasons. Suffice it to say it has a sidebar which is autogenerated, where the top level contains a ...
0
votes
0
answers
26
views
Docusaurus 2 - How to add an button in right items to Navbar in mobile view?
I'd like to add an item like a button (Most likely GitHub link) in right items to Navbar in mobile view like below.
I didn't see any option in docusaurus.config.js for that.
navbar: {
items: [
...
0
votes
0
answers
18
views
How to add cards in docusaurus site just like implemented in playground page in docusaurus site?
I want to add cards to my docusaurus v2 site just like in the Playground Page in docusaurus.io/docs/playground. Can someone tell me how to implement it?
0
votes
0
answers
14
views
How do I read raw contents of markdown file into string using webpack 5 and docusaurus
I am currently refactoring a Docusaurus app that displays developer documentation from markdown docs. The app has a "quick start" feature which has a wizard that users fill out info and then ...
0
votes
0
answers
66
views
typescript moduleResolution nodenext and importing tsx file
I have to import a custom package export and for that, I had to set the moduleResolution to node16 or nodenext as per 3307. Once I did this, the import path is recognized. However, I now have a new ...
0
votes
0
answers
21
views
Docusaurus - autoCollapseCategories not working
I need to expand the clicked sidebar category and collapse the rest of the categories automatically
So far I found this:
https://docusaurus.io/docs/sidebar#auto-collapse-sidebar-categories
module....
0
votes
1
answer
11
views
Docusaurus | ValidationError: "authorsMapPath" is not allowed
I wanna try to use the global "authors" in the blog markdown file "authorsMapPath" this parameter in the docusaurus.config.js file.
However, whatever I tried in the presets or ...
0
votes
1
answer
20
views
Docusaurus website GitHub pages deploy doesn't work for organisations
When I completed to design of our docs website with Docusaurus I wanted to deploy it to GitHub pages. In normally this is no hard. I need to change a few things in docusaurus.config.js and use "...
0
votes
0
answers
17
views
Docusaurus v2 set security headers
In Docusaurus v2 I want to implement some security headers. But I couldn't find any documentation about security headers in Docusaurus.
Here are some header I want to add, especially to prevent other ...
-1
votes
0
answers
19
views
Custom layout for each Docs subdirectory
How can I add in docusaurus a custom layout for Docs (and subfolders) that in turn display where the navbar shows the site title usually, the current md file title (or name) instead ? Can swizzling be ...
0
votes
1
answer
19
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 ...
0
votes
0
answers
14
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
25
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
35
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
21
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
23
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 ...
2
votes
0
answers
75
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
33
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
11
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
17
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
19
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
9
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'...
0
votes
0
answers
49
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 ...
0
votes
0
answers
9
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
19
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
14
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 ...
1
vote
0
answers
23
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 ...
0
votes
2
answers
59
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
31
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
23
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
17
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
13
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&...
0
votes
0
answers
21
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
27
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
0
answers
78
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 ...
0
votes
0
answers
64
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
41
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 ...
0
votes
0
answers
74
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
81
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
31
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
37
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
24
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
54
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 ...
0
votes
0
answers
65
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
35
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
22
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
124
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
28
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 ...