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
33
views
Re-exporting function from library
I am working on a npm package development, and it has {name}.d.ts for each module, which just re-exports members of the module like:
export * from "../../lib/build/some-module";
import * as ...
-2
votes
0
answers
23
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 ...
0
votes
0
answers
6
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
6
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
11
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
22
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
6
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
28
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
12
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
35
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
51
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
24
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
8
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
10
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
32
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
33
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
56
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 ...
2
votes
1
answer
39
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
42
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
64
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
13
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
136
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
38
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
24
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
92
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
15
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
59
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
8
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
18
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
86
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
11
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
66
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
192
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
53
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
23
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
1
answer
98
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
21
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
90
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
90
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
52
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
46
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
94
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
43
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
47
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 ...
0
votes
0
answers
37
views
Docusaurus: Adding Coveo Search code. Where should these pieces go
I'm working through a Coveo Atomic tutorial here: https://levelup.coveo.com/learn/courses/atomic/lessons/lesson-0-setup-and-initializing-the-search-interface In their example they show setting up the ...
0
votes
2
answers
91
views
Target directory not found in Docker container
I came across such a problem. I'm locally building my docusaurus site via Docker container.
From inside a docusaurus directory I run such a command:
docker run -it --rm --name doc-lab --mount type=...
0
votes
1
answer
157
views
Docusaurus and Tailwind CSS
I set up Docusaurus with Tailwind CSS based on this tutorial and I got everything working.
The issue I have now is that some of the styling applied to my actual documentation are now missing. The ...
0
votes
0
answers
41
views
Issue trying to host docusaurus site on Sharepoint Online
I am trying to host a docusaurus site on a SharePoint Online library. I have followed this article: How to host static HTML sites on modern SharePoint site collections - HANDS ON SharePoint (...
0
votes
1
answer
39
views
Docusaurus: Swizzle Navbar - Tweak Navbar items behavior with version change
I want to customize my Navbar in such a way that, say when versions 1.2.0 and below are viewed, only Dropdown A should be visible. When versions 1.3.0 and above are viewed, Dropdown B or more must be ...
0
votes
1
answer
39
views
Folder within another folder no longer in alphabetical order
I am trying to figure out why a folder I created underneath another folder is no longer in alphabetical order
Here is the layout that I want
Environment
Overview
A topic that starts with A
A ...