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.
433
questions
0
votes
0
answers
6
views
Docusaurus: Creating Headings in javascript file, which also show up in the table of content
I want to export a react component, that contains a heading which is suppose to show up in the table of content aswell.
My first idea was to use the docusaurus Heading component, which sizes the ...
0
votes
0
answers
12
views
Link a readme from a different repository to another repository that uses the readme and Docusaurus to build a docs site
I have a repository called typescript that has a readme file along with other files. So the structure is like this:
TYPESCRIPT REPO
sdk
node
... some other such folders
README.md
I also have a docs ...
0
votes
0
answers
26
views
Is it possible customize next and previous page link in docusaurus
Is there a way to link another high level page on docusaurus instead of linking the next page which is generated automatically.
In the image above, the link to next page in bottom is "...
0
votes
0
answers
12
views
Generate more than one api documentation
I'm trying to generate more than one api with docusaurus. In this example: https://docusaurus-openapi.netlify.app/docs/intro, we only generated one api. How can I add another api?
Thanks
0
votes
1
answer
14
views
Unable to add icon to sidebar in docusaurus
My sidebar looks like
... items: [ { type: 'category', label: 'iOS', link: { ...
I want to add an svg file at the iOS level containing the Apple logo, within that string.
I tried adding link to svg ...
1
vote
0
answers
25
views
How to hide the dropdown in docusaurus navbar after clicking a particular option
I am trying to build a docusaurus site which has a dropdown linked to sidebar. Upon clicking a metallic dropdown I want to hide that dropdown. Is it possible to achieve this?
My docusaurus.config.js
...
-1
votes
0
answers
8
views
Sidebar bolding and arrows UX
had a few questions regarding the sidebar and would love some insight:
in the sidebar, if you link the category to a document (which is essentially like a landing page), it affects the collapsing ...
-2
votes
0
answers
29
views
Imports from package are not resolved
I am developing an npm package which has both default and named exports for every module.
They export the same thing basically. And when installing and trying to import things as named imports in ...
-1
votes
0
answers
30
views
In Docusaurus, how can we enable detailed build logging?
I'm getting this error, but because I cannot see where in my code it is, I have no easy way of fixing it:
(base) ➜ my-website git:(master) ✗ npm run build
> my-website@0.0.0 build
> docusaurus ...
0
votes
0
answers
17
views
Docusaurus i18n & relative image paths
Consider the following folder structure of a Docusaurus project (making use of @theme/IdealImage):
website/
└── docs/
├── 01-getting-started/
│ ├── _shared/
│ │ └── foo.png
│ └─...
0
votes
0
answers
19
views
Can I build Docusaurus site in development mode?
I have many pages in my Docusaurus v2 site with:
draft: true
And I can view these by starting Docusaurus on my local machine like so:
yarn start
For the production build, these are omitted, since in ...
0
votes
1
answer
39
views
Docusaurus not loading custom fonts
My problem is that Docusaurus it is not loading custom fonts. I have the following structure:
website
│
└───src
│ │ pages
│ │ ...
│ │
│ └───css
│ │ custom.css
│
└───static
...
0
votes
0
answers
11
views
Docusaurus get tag list in mdx file
I want to get the list of all tags in one of my .mdx pages. Is there a way to import the tag list from docusaurus there?
I have tried using the useDocusaurusContext hook but that only works in ...
0
votes
0
answers
36
views
Save Current Docusaurus Page as PDF
I am making a project with Docusaurus using markdown to create the pages inside of it and I had an idea but idk if it's possible.
The idea is to create some kind of button or link to Download the ...
1
vote
0
answers
17
views
Math equations not rendering in docusaurus
Following instructions exactly as they are on:
https://docusaurus.io/docs/markdown-features/math-equations
Also checked that katex.css was properly loaded.
But equations not rendering. Below are the ...
0
votes
1
answer
38
views
Testing the index using the browse tab gives no results
I'm trying to integrate Algolia with Docusaurus. I created a crawler using the Docusaurus Algolia v2 example and created an index after running it. In the Algolia web, when I test the index using the ...
1
vote
1
answer
54
views
How do I control the behavior of a JSX object from outside?
I swizzled a component in Docusaurus to customize a header/admonition that appears at the top of all pages in my documentation depending on some condition. In this case, the particular condition is an ...
0
votes
0
answers
32
views
Getting error when I run "npm run build" :Can't import the named export 'XXXX' from non EcmaScript module (only default export is available)
when I run "npm install" and "npm run start"
it works fine,
but when I run "npm run build", I get this error
./node_modules/eta/dist/etamodule.mjs
"Can't import the ...
0
votes
0
answers
11
views
Docusaurus , MDXComponents Scope and Stiches Global Styling
I'm migrating the docs of a project to Docusaurus.
We have a bunch of components in our project that we have to document.
Docusaurus has this feature where you can import and then export the ...
0
votes
0
answers
12
views
How to Access Global CSS Styles From Docusaurus Server Side Source Code (From Within A Component Module)?
I can access the ifm styles from Docusaurus using client side javascript, via window.getComputedStyle as listed below. Notice this code is from WITHIN a React component:
export function ...
1
vote
1
answer
34
views
Prevent pandoc from escaping a characters
In source markdown (WikiJS format) i have the following element:
{height=0.8cm}
I need to transform it into an md that can be used in ...
1
vote
1
answer
44
views
How to synchronise dark/light mode between Docusaurus and MaterialUI?
I am new Docusaurus user, trying to synchronise Docusaurus dark/light mode with MaterialUI's dark/light mode. For example, when the toggle switch is changed from light to dark mode in Docusaurus then ...
3
votes
1
answer
69
views
Custom Tag Page in Docusaurus
I want to create a custom Tag Page for docusaurus. I am using the classic theme and successfully swizzled DocTagDocListPage. So now I can change the template for all tag pages.
What I want to do is ...
3
votes
1
answer
50
views
Self-hosted deployment of docusaurus on 2 URLs
I am using Docusaurus to provide a User Manual for a web app that is hosted on an AWS EC2 virtual server. The user accesses it through a button on the app. I am trying to set it up so that it will ...
0
votes
0
answers
49
views
Docusaurus "Expected corresponding JSX closing tag for" error
I have a lot of old documentation *.md files in WikiJS format. I need to convert them to docusaurus-compatible md format.
There are some strings like "http://<gateway-ip>:8889/ad-groups/&...
0
votes
1
answer
89
views
How to develop a Docusaurus documentation with Docker?
I want to be able to develop a Docusaurus based documentation only by using Docker as local development environment. How can I do this?
1
vote
0
answers
14
views
Plugin for site variables?
I'm working on transferring a site from Docsify to Docusaurus. We use variables across the site for URL's, API calls, versions, etc. On docsify we used a variable plugin called docsify-variables and I ...
1
vote
0
answers
162
views
404 error after adding `trailingSlash: false` in a docusaurus website
I have a website made by docusaurus 2.0.0-beta.18. I realize that, in production, when I click on items in the sidebar it first goes to https://example.com/docs/a-page. If I reload the page, the url ...
0
votes
1
answer
43
views
Docusaurus make full page background gradient
I've just started to create a new project by using Docusaurus and have tried to change background of home page to linear gradient. However, couldn't make it. I can change the navbar and the footer ...
1
vote
0
answers
27
views
Page generation with docusaurus
I wonder if it is possible to generate static pages from data(e.g. JSON) in docusaurus. Is there any open source project made with docusaurus that does same thing?
1
vote
1
answer
142
views
Docusaurus: add custom button to code block?
I’m testing to use Docusaurus for a tutorial and documentation site. I want to customize the code block in markup (md or mdx) to for example add an edit button inside the code block that will open the ...
0
votes
0
answers
17
views
How can make the three-panel content of HomepageFeatures.js clickable?
three panels
In Docusaurus V2 I am editing HomepageFeatures.js for the three panels. What I would like to do is make them clickable so that they link to the relevant sections.
In the image here this ...
1
vote
0
answers
78
views
Docusaurus failed to build on Linux
Can be successfully built in Windows, but not in Linux.
I'm using docusaurus 2.3.1
Environment in Windows:
Windows 10
node v16.17.0
npm 9.3.0
yarn 1.22.19
Environment in Linux:
Centos 7.9.2009
node ...
0
votes
0
answers
9
views
How do I format REPL-style code in Docusaurus?
Using Docusaurus, is it possible to have prompts such as $ or >>> appear on the left and not be included when copying, just as line numbers are handled?
For example:
>>> 10 + 5
If ...
0
votes
0
answers
20
views
Can I have canonical links that show to latest version?
I use documentation versioning on my site. I've noticed that some versions of docs rank higher on Google than the latest version of the docs.
I wouldn't discourage google from indexing, although that ...
2
votes
1
answer
116
views
How to call a JS function at the page load of Docusaurus site?
I need to load a custom JS function I wrote at the beginning of the page load in a Docusaurus documentation site.
What have I tried so far?
Attempt #1: Appending the script to the index.js file (.\src\...
1
vote
0
answers
13
views
Rendering issues with our Docusaurus wiki
Rendering issues with our Docusaurus wiki page, when I navigate from staring the right pane renders properly beside left navigation pane, however when I refresh the page after navigating, the right ...
0
votes
1
answer
90
views
How to access the front matter in a docusaurus website?
I am working on a docusaurus based website which has front matter available in the following format.
---
id: introduction
title: Welcome to Rowy
slug: /
---
I am integrating Cusdis (an open source ...
1
vote
1
answer
247
views
How do I customize the a generated-index page in Docusaurus?
I have a generated-index page and I can see how to customize the on page title and description in the category.json for the directory, but is there a way to customize the items that are generated by ...
1
vote
1
answer
55
views
rendering logic doesn't work in production static site
The following code renders a warning message conditionally, when user switch site (by clicking the button, or accessing directly using URL), the website will show a warning message, and disappear on ...
0
votes
0
answers
27
views
How to host existing files in Docusarus?
Alongside Markdown files, I would like to host HTML files in Docusarus.
Also I want to make HTML file Searchable. If i reference the HTML in MD file. it's not searchable in the website.
Below is the ...
2
votes
2
answers
124
views
How do I change the light/dark mode icon in Docusaurus?
Docusaurus has a nice, minimal sun and moon for their light/dark mode button: https://docusaurus.io/
But our Docusaurus page automatically uses a toggle button that shows the moon emoji 🌜 and the sun ...
0
votes
0
answers
23
views
Docusaurus: can I change the I18n URL format?
I have the "de" and "en" locale configured, with "de" being the default. When I am on my blog index page and change the locale to "en" using the dropdown, it ...
0
votes
1
answer
127
views
Docusaurus: How can I have multiple versions of different docs in the docs directory?
I'm working with Docusaurus to create a documentation site for 3 different education courses - all within the docs folder.
So I'm looking for a way to have the version be different across folders in ...
1
vote
1
answer
107
views
Docusaurus 2 How do i add a react component for a feedback form to appear on each page
I'm trying to add a simple Feedback form. I have seen several written as a React component. Where/how would I put this React component so that it would show, ideally on the bottom of each topic page, ...
1
vote
1
answer
66
views
How can I add an HTML plugin in the `docusaurus.config.js` file for it to appear on every page?
I am trying to integrate CusDis (which is a light weight comment system) in a Docusaurus project.
I simply added the following code in one of the pages:
<head>
<script async defer src="...
0
votes
1
answer
53
views
Is there built-in authorization mechanism in docusaurus?
Is there any authorization mechanism in docusaurus? In my case not everyone should have access to the documentation
Skimmed through the official documentaion and couldn't find the answer to my ...
1
vote
0
answers
114
views
How to get a single shared sidebar for a multi-instance Docusaurus site that has versioned and unversioned folders?
I’m using Facebook’s open source tool Docusaurus to provide documentation for a software component I’m currently developing. So far everything has been working great, but now requirements are getting ...
1
vote
0
answers
44
views
Deploy docusaurus site (generated build files) offline inside flutter webview
I just started develop a website using docusaurus and I want to run this website within flutter on mobile (android or ios) ,I thought of running the build files (index.html) through flutter webview, ...
0
votes
0
answers
48
views
How to update default classic theme in docusaurus to avoid appending icon to external links?
I have searched the documentation but cannot seem to find how to change the style of external links in the docusaurus classic-theme. Is this possible?
Inspecting the block element in Firefox shows ...