519 questions
Best practices
0
votes
4
replies
76
views
Can I prevent my docusaurus website going offline during the build process?
Currently, my website builds on pushes to main using GitHub Actions. The GA takes about 3 minutes, during which the website is 404.
My experience of other website builders (Jekyll, WP, whatever) is ...
3
votes
1
answer
151
views
"Next" pagination button shows English category title instead of translated label [closed]
I am using Docusaurus (v3) with i18n enabled (English as default, Russian as a second language).
I have a documentation category configured to use a generated-index. I have successfully translated the ...
1
vote
0
answers
88
views
Docsearch Typesense scraper only finds records on Docusaurus landing page
Problem
I’m using Docusaurus with Typesense and the docsearch-typesense-scraper to index my documentation site.
Everything runs fine — the sitemap is found, and the scraper produces records.
However, ...
0
votes
0
answers
105
views
How to show a single version dropdown per product in Docusaurus multi-product documentation?
I’m building documentation for multiple products on a single Docusaurus 3 website. Each product has its own versions, and I want users to be able to select a product first, then optionally select a ...
0
votes
0
answers
57
views
Docusaurus url breaks build when using process.env
I have two subdomains for my Docusaurus site:
https://test.mydomain.com
https://docs.mydomain.com
In my docusaurus.config.js, I tried setting the url using an environment variable:
const config = {
// ...
0
votes
0
answers
64
views
Add index.html suffix to docusaurus openapi generated files
When building a docusaurus site its index.html hrefs are https://localhost:3000/integrations/docs and I would like it to be https://localhost:3000/integrations/docs/index.html, because I'm using its ...
0
votes
0
answers
67
views
Automatically generate sidebar docusaurus
Question
Description
I created two sidebars: one for the docs directory and another for the docs/cs directory. Inside the cs directory, there's a README.md file and a leetcode/README.md file. The ...
0
votes
2
answers
180
views
How can I force docusaurus to do a hard navigation for a link in the navbar
I'm embedding my docusaurus site within a bigger Next.js project. When a user clicks on the title link in the navbar, docusaurus does a soft, client-side navigation to its home page. This is NOT what ...
0
votes
1
answer
118
views
Making docusaurus RTL
I'm having trouble making docusaurus RTL. I used a solution that changed the CSS by the following:
html {
direction: rtl;
font-family: 'Vazir', 'Tahoma', 'Arial', sans-serif;
}
/* Optionally, ...
0
votes
0
answers
235
views
How can I automatically add numbered headings to heading elements in Docusaurus?
I'm using Docusaurus v3 to build documentation for my QMS, and I want to automatically add hierarchical numbering to headings, like this:
# 1. Introduction
## 1.1 Overview
### 1.1.1 Details
I want to ...
0
votes
0
answers
81
views
Github Pages @easyops-cn/docusaurus-search-local duplicates url
I have a docusaurus site hosted on a custom domain on github pages. When I run the site locally the search works properly through the docs. When I am on the custom domain the search returns a ...
0
votes
0
answers
129
views
Docusaurus: Base URL not working with pm2 serve
I am using the Docusaurus app (version: 3.4.0) to render the documents in my other React app.
In my React app, I am rendering Docusaurus via iframe, both my React app and Docusaurus app are deployed ...
0
votes
0
answers
111
views
Docusaurus Java Syntax Highlighting Not Working
I have a Docusaurus project where I am trying to add support for Java syntax highlighting however, despite following the Docusaurus documentation, I was unable to get it to work.
So far I have tried ...
0
votes
1
answer
116
views
How can I apply Docusaurus theme to HTML tags in custom component
I have created a simple custom component to display an HTML details element with a predefined summary:
export default function Solution({children}) {
return (
<details>
&...
1
vote
1
answer
58
views
Prevent Pandoc from generating autolinks in Markdown [closed]
I'm converting docx to Markdown using Pandoc.
Some links are converted to Markdown autolinks. I would like switch off the autolinks generation in Pandoc, but did not find a way to do that.
Background: ...
1
vote
1
answer
107
views
docusaurus Gihub Page creation with npm
I'm facing a problem with deploying my Docusaurus project. It works fine locally, but on my GitHub Pages it's not running.
I'm not finding the documentation on NPM very helpful. It seems like everyone ...
0
votes
0
answers
78
views
Failed to run docsearch scraper; output is 0 nhits and cannot complete search in the local windows machine
I am trying to set up type sense as a search engine for my docusaurus website in Windows 10.
using typesense docker image and running in my local machine where docsearch scrapper is installed. anytime ...
0
votes
1
answer
48
views
x_1 is not defined in Docusaurus
In my file KNN example.mdx i have following mdx format text i have not used any react code here.
1. **Distance**:
For the query point \((x, y) = (0, 0)\), calculate the Euclidean distance to 5 ...
2
votes
0
answers
121
views
Docusaurus plugin-client-redirects not working on GitHub pages?
We have Docusaurus project deployed on the gh-pages branch in GitHub.
The docs work fine. We migrated them from Jekyll, and some of the pages have new locations.
We are trying to set up the client-...
2
votes
1
answer
115
views
In Docusaurus markdown link inside details won't parse
In details section, for example -
<details>
<summary>Some title</summary>
Some text with [link](url)
</details>
the text [link](url) won't convert to an URL, it stays ...
0
votes
0
answers
75
views
Can I use env inside href="" of <a> tag in docusauras docs?
I'm trying to implement a link in my Docusaurus project that redirects users to a registration page. However, I'm facing challenges because the registration page is hosted on a different port and ...
0
votes
1
answer
465
views
How to Access Docusaurus Static Pages Without a Local Server?
I'm using Docusaurus to build a static site, and I want to access the generated pages directly from the file system without running a local server.
Currently, the URLs are structured like /docs/...
-1
votes
1
answer
208
views
When we build docusaurus build, it creates a file as rumtime~main.[hash].js. The question is can we avoid ~ in the name?
I am using docusaurus library to build the documentation for my application. For details please refer https://docusaurus.io/
Eveyrthing works well,but when i build the site using the command
...
1
vote
0
answers
131
views
Multiple doc paths with one instance in Docusaurus
I'm porting a doc site to Docusaurus. There are 5 products that each have specific documentation, and I'd like there to be a path for each product (mysite.com/product-1/, mysite.com/product-2/, and so ...
0
votes
2
answers
209
views
Equivalent of BrowserOnly within NextJS - i.e. true client-side rendering
In recent versions of nextjs, one can use the use client directive to tell nextjs to render the component "in the client", instead of on the server. Digging deeper into this, its a terrible ...
1
vote
0
answers
260
views
Custom tag names in Remark Plugin
I'm trying to modify specific emphases nodes and turn them to badges.
(I want to replace the node's tag with a custom Material Web element tag)!
I tried to set the type of the node to element in order ...
1
vote
1
answer
555
views
How to prevent MDX documents from automatically adding <p> tags when rendering text that includes line breaks inside existing <p> tags?
I noticed that when I add MDX documents to the Docusaurus blog, if I include a <p> tag with child elements and line breaks, the text content inside gets wrapped with an additional <p> tag.
...
0
votes
1
answer
184
views
Change title color in Docusaurus
On the site homepage, there is the "title" text which is the big text on the banner. By default, it is white on light theme and black on dark theme, and I want to swap this. Is there a ...
0
votes
1
answer
156
views
Docusaurus Build Fails with EEXIST Error for index.html
I'm encountering an error when attempting to build my Docusaurus project using yarn build. The build process fails with an EEXIST file already exists error for the index.html file. This issue doesn't ...
0
votes
1
answer
173
views
unique home pages for two sites
I have a single instance of docusaurus and I want to create two sites (site A and site B). There are "documents" that are shared between sites. I have create two different "docusaurus....
-2
votes
1
answer
294
views
Issues encountered while upgrading from v3.4.0 to v3.5.2
I was trying to upgrade my existing docusaurus project from v3.4.0 to v3.5.2 when I encountered few issues.
When I migrated the packages to v3.5.2 getting errors related to '@theme/Unlisted' ...
1
vote
0
answers
119
views
Fetch Docusaurus Pages from Database
Is it possible to fetch pages from database in docusaurus? I want to implement built-in editor in Docusaurus that works without committing on github and for that, we would need database. I don't want ...
0
votes
2
answers
378
views
docs as baseUrl for docusaurus fails on build
I can't seem to give /docs/ as the baseUrl.
baseUrl: '/docs/',
Any name other than docs works.
So its docs restricted somewhere in the code ? Because build fails when giving docs.
Using docusaurus 3....
2
votes
2
answers
2k
views
Docusaurus build failed due to docusaurus-search-local plugin
The docusaurus build fails because of error with docusaurus-search-local plugin:
Unable to build website for locale en.
[ERROR] TypeError: Cannot read properties of undefined (reading 'load')
at ...
1
vote
1
answer
718
views
Docusaurus: Is it possible to exclude (hide) a file when using mdx DocCardList, while displaying the rest?
[some edits to clarify]
I'm using
import DocCardList from '@theme/DocCardList';
<DocCardList />
This is to get the "boxes" that go to other pages on the "main" page. I'd ...
1
vote
2
answers
856
views
Docusaurus: How can I display a Markdown file inline inside a Markdown page?
In my Docusaurus website, I want to have a Markdown file stored in one place and displayed in six places. How do I do this (a) in Docusaurus, (b) in HTML (c) a better way?
My attempt:
In src\...
0
votes
1
answer
951
views
Customize sidebar items with docusaurus-plugin-openapi
I have been trying the Docusaurus OpenAPI plugin for my API documentation. But it is very hard for me to customize it the way I want. For example, how do I change what appears in the sidebar items? ...
2
votes
1
answer
184
views
index.html file ignoring footer in docusaurus.config.js file
My understanding is that the docusuarus.config.js file essentially translates the defined info into HTML that builds your website. The file the translated info goes to is the 'index.html' file.
...
1
vote
1
answer
279
views
The image field in the blog front matter, how to use the image in the assets folder in the same directory
I try to set the front matter like this
draft: true
slug: otOARU_mJTlg
title: XXX
image: assets/images/otOARU_mJTlg-cover.webp
But the picture can't be found.
I want to use pictures with relative ...
0
votes
1
answer
200
views
Is there a way to get Docusaurus to tell me about all missing images / test for missing images?
When our CI/CD scripts build Docusaurus, we occassionally run into cases where someone forgot to git add an image:
98.49 Error: Image docs/add-ons/adjustment-period-ex.png used in docs/add-ons/custom-...
1
vote
0
answers
77
views
How can I implement this markdown syntax into my docusaurus project?
I'm currently doing a project on Docusaurus, I have pre-written md files with this type of syntax:
h1. Title
{{toc}}
h3. Subtitle
# ...
# ...
Paragraph
<pre>
<code class="java"&...
1
vote
3
answers
848
views
How to deploy Docusaurus site from subfolder (not root) of repository
I want to place all of my Docusaurus site files into a subfolder called website inside my project repo and have my site deploy properly.
I have noticed Docusaurus sites that have done this (for ...
1
vote
1
answer
90
views
Sidebar shorthand for complex category types in Docusaurus
I'm trying to simplify the sidebar.js file on my Docusaurus project by using config shorthand. I've however reached a blocker as it seems that Docusaurus does not support shorthand for category types ...
0
votes
1
answer
944
views
How can I add a new component to footer in docusaurus?
I want to remove the default footer from docusaurus.config:
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
...
3
votes
1
answer
624
views
How to Correct a Docusaurus-Generated Canonical URL That Points to a Redirect?
I'm managing a website built with Docusaurus, and I've encountered an SEO issue where the automatically generated canonical URL points to a redirect. I need advice on how to resolve this problem ...
0
votes
1
answer
141
views
Renaming /docs sub folders not changing the nav
I renamed the /docs sub folders and files but doesn't reflect on the browser for some weird reason. Note that the link changed but not the visible texts
I was expecting since I've components that it ...
1
vote
1
answer
999
views
Increase width of content column in Docusaurus
I'm using Dousaurus V3.
I want to increase the width of the center column where the markdown content i rendered.
The screenshow is from the Docusaurus docs site, which has a width of 990px. My own ...
1
vote
0
answers
81
views
How can I remove the OPTIONAL value from a schema in Docusaurus using an OpenApi file?
I'm try to remove the OPTIONAL value from the schema in Docusaurus using an OpenApi file
This is the package.json that I use it.
{
"name": "my-websiteopenapi-2",
"version&...
1
vote
1
answer
131
views
Does Docusaurus have any sort of sitewide register?
I've been tasked with migrating my team's docs from Jekyll to Docusaurus. In Jekyll, I wrote a bunch of plugins that rely heavily on its register API (site.data, context.registers, and other hashes) ...
4
votes
2
answers
524
views
Docusaurus Admonitions not working since upgrade from V2 to V3
It was working on version 2, but from version 3, the admonitions are rendered in simple text, without the special design.
This is the package.json file:
{
"name": "my-website",
...