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.
479
questions
0
votes
0
answers
150
views
Is there an easy way to use a static `index.html` page in docusaurus (2.0.4)?
I have an existing webpgage and would like to wrap it with docusaurus (2.0.4).
I have the index.html file in the static folder together with other assets, basically copied the complete hompeage into ...
0
votes
0
answers
33
views
Is there a way to create pptx download button using anchor tag in docusaurus?
Currently, I am writing MDX to create a dynamic download link to download the ppt file based on a condition.
When I use , it is working fine but when I use the anchor tag I am unable to do it.
I get
...
1
vote
0
answers
398
views
Implementing Authentik as Single Sign-On (SSO) for Securing a Docusaurus Generated Static HTML
I am developing a Go backend and using Docusaurus to generate a static HTML website. I would like to implement Authentik as a Single Sign-On (SSO) solution to secure the static HTML pages. Previously, ...
1
vote
0
answers
100
views
ERROR Docusaurus server-side rendering could not render static page with path
I am trying to include the markdown files in the docusaurus site, please check the
image
these markdown files are actually converted files from jupyter notebooks, i used a python library nbconvert to ...
2
votes
0
answers
80
views
Docusaurus: Make a shared links template for all pages
What I want to accomplish
In docusaurus I want to have a single file where I can declare all the links in my docs, preferably using links to the md file that are processed by docusaurus.
Description ...
0
votes
1
answer
94
views
How can I integrate authentication with Docusaurus in Node.js?
I am building a documentation website using Docusaurus 2.0 and I would like to add authentication to restrict access to certain pages. I have looked at the Docusaurus 2.0 documentation but could not ...
0
votes
0
answers
104
views
How do I globally import Tabs in docusaurus.config.js in Docusaurus 2, so that I don't have to import them in every file?
That I don't have to import
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
in every file.
To solve my issue, I added the code in docusaurus.config.js
const Tabs = require('@...
0
votes
0
answers
109
views
Docusaurus — How to shift the table of contents
I'm currently working on writing up a case study using docusaurus and the case-study.md file looks like this
As you can see, the content is on the left, and the table of contents is on the right. By ...
4
votes
0
answers
132
views
Hook useTabGroupChoice is called outside the <TabGroupChoiceProvider> error while using docusaurus-plugin-openapi-docs
I'm testing docusaurus-plugin-openapi-docs on my docusaurus website and trying to run the example (petstore).
The files are generated properly and are showing on my sidebar. However, when I click on ...
1
vote
0
answers
90
views
Docusaurus swizzled plugin, DocNavbarItem: couldn't find any doc with id "undefined" in version current"
I am trying to create a custom Docusaurus package. In this package I am trying to swizzle the DocNavbarItem component. I am able to get my plugin enabled in Docusaurus, but when I try to run the code ...
3
votes
0
answers
185
views
Can you embed Docusaurus inside a larger ReactJS project?
I have a ReactJS web application project, with an auth flow, dashboard, etc. However, I would also like to have a public "Guide" section of the site. To speed development time, I would like ...
1
vote
0
answers
258
views
In Docusaurus v2, is there a way to handle redirects to <some URL path>/default.aspx that Sharepoint automatically inserts into every page?
I have a Docusaurus site hosted under <SHAREPOINT_SITE_URL>/. The first time I visit the page from outside, I get <SHAREPOINT_URL/default.aspx, a route which Docusaurus doesn't understand.
...
0
votes
0
answers
127
views
Docusaurus strips some attributes from inline SVGs; need ID for accessibility
I'm using inline SVGs like this:
Content of icon-checkmark.svg:
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 46 46"><title id="...
0
votes
0
answers
209
views
Error when trying to deploy Docusaurus in Git Pages
I already configured the docusaurus.config.js file. And when executing the deploy with the command:
"GIT_USER=<GITHUB_USERNAME> yarn deploy" the error appears:
error Couldn't find a ...
1
vote
1
answer
128
views
Docusaurus bug when opening submenus in the left nav-bar menu
We are using docusaurus for a long time, but lately we are receiving feedbacks from our Docs website that some menus are not properly opening.
we have a structure like this example
Menu 1
|
|
|-- ...
0
votes
1
answer
454
views
How to add formatted code into a mdx-code-block in Docusaurus?
I need to add formatted code into multiple tabs in Docusaurus MDX.
I have this code, but it is not working:
```mdx-code-block
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
```
...
3
votes
1
answer
135
views
How can I integrate AdSense into my Docusaurus project for monetization?
I'm working on a Docusaurus project hosted on GitHub at https://github.com/Ajay-Dhangar/CodeMastermindHQ. I want to integrate Google AdSense into my website to monetize it. However, I'm facing issues ...
0
votes
0
answers
70
views
How to process Google SSO callback via Cognito for Cloudfront distribution
we run a static website where I work via Docusaurus. At the moment we have the following setup:
A public content repository
A private content repository
An infra repository (in terraform) which ...
0
votes
1
answer
79
views
How can I integrate Cusdis comments in my Docusaurus Website?
I want to integrate Cusdis Comments in my Docusaurus website.
I tried adding the react-cusdis@^2.1.3 package via yarn.
yarn add react-cusdis
and added the following tags to the pages I wanted to ...
1
vote
0
answers
75
views
Getting Unreachable hosts error when trying to scrape data
I'm trying to scrape data using the following command.
docker run -it --env-file=./config/development/dev.env -e "CONFIG=$(cat ./config/config.json | jq -r tostring)" algolia/docsearch-...
0
votes
0
answers
103
views
docusaurus error: Bad Docusaurus plugin value plugins[0]
I tried to run my docusaurus application that worked o.k before and I have an error without changing anything...
This is the error I get:
E:\ngDocs>npm run start
> [email protected] start
> ...
0
votes
0
answers
147
views
JavaScript heap out of memory in Docusaurus though size is set
I want to build my really big docusaurus project with npx docusaurus build. I'm running ubuntu with 64GB RAM.
I've set the RAM limit to --max-old-space-size=46080 in the NODE_OPTIONS enivironment ...
2
votes
0
answers
58
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
73
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
83
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
114
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
254
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
271
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
vote
0
answers
159
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
74
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
185
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
67
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
171
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
102
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
70
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
94
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
90
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
92
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
55
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
84
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 ...
2
votes
2
answers
352
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
311
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
186
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
146
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
713
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
48
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
389
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
118
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
48
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
705
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 ...