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
1
vote
0
answers
285
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
20
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 ...
1
vote
0
answers
62
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 ...
3
votes
1
answer
523
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
23
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
403
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 ...
2
votes
2
answers
1k
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
77
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 ...
2
votes
1
answer
496
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
56
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
2
answers
582
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
355
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
2
answers
196
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
212
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
273
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
93
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
76
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
84
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
241
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=...
1
vote
1
answer
761
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
150
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
172
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
60
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 ...
1
vote
2
answers
460
views
How to change the logo size in Docusaurus?
How to change the logo height on docusaurus? I've tried various things but no luck
Changing the css to navbar__brand and set the height on the image it self
0
votes
1
answer
629
views
docusaurus autogenerated sidebar displaying category index pages as separate pages instead
According to the Category index convention docs you should be able to add a category index page for the index within an autogenerated section.
A category index document is a document following one of ...
0
votes
1
answer
718
views
Docusaurus getting mermaid up and running
[docusaurus] Newbie question: I am attempting to get mermaid up and running on my website, but am struggling to implement https://docusaurus.io/docs/markdown-features/diagrams. My docusaurus.config.js ...
0
votes
1
answer
89
views
how do you tell if a website is using docusaurus?
How can you tell if a documentation website is using Docusaurus?
Take for example this website:
https://beta.openai.com/docs/api-reference/introduction
I suspect that it was build with Docusaurus but ...
0
votes
2
answers
171
views
Docusaurus - Hide always folder's name in url
this is my question about docusuarus (docusaurus.io):
In my site I have several folders inside "docs" folder:
docs
doc1.md
folder1
doc2.md
folder2
doc3.md
so ...
1
vote
1
answer
186
views
useEffect hook to check if browser is opened in mobile so that logo is displayed accordingly
This code is of the component which displays website logo accordingly. But problem with this code is,
I am getting "ReferenceError: window is not defined"
Because in SSR, its unable to catch ...
1
vote
1
answer
454
views
Docusaurus: Swizzling or Root component overriding - For logo change
I made a website using docusaurus, in which I've defined its navbar as :
docusaurus.config.js file
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
...
1
vote
1
answer
87
views
Why are classes getting stripped from <ul> tags in Docusaurus?
When I use unordered lists in Docusaurus Markdown files, the classes are removed from the HTML in the final output.
I enter an unordered list into a Markdown file as HTML, eg:
<ul class="...
4
votes
1
answer
535
views
How to tweak Docusaurus webpack config for some react component?
It seems that one of my component ( https://www.npmjs.com/package/@stoplight/json-schema-viewer ) needs some tweaks in webpack with Docusaurus
Any ideas ? I tried to follow https://gist.github.com/...
0
votes
0
answers
86
views
How to change logo in mobile and desktop, docusaurus being used
I want to change the logo in mobile view and keep a bigger logo in desktop view.
fileName : docusaurus.config
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
...
0
votes
1
answer
236
views
Deep linking in docusaurus generates 404 page not found errors [closed]
ampersandtarski.github.io is a site generated with docusaurus and hosted by github pages. Currently, during generation docusaurus doesn't detect any broken links. Also, the links at the site work as ...
-2
votes
1
answer
208
views
How to deploy a Docusaurus website to Google App Engine? [closed]
I built a production-ready Docusaurus website using docusaurus build (or npm run build). How can I deploy it to Google App Engine as a static website?
1
vote
0
answers
55
views
How to have an image render before alt text
I'm working on a documentation site and noticed that the images have a very slight delay. I realized it's because the alt text shows up before the image renders.
Is there a way to hide the alt text ...
0
votes
0
answers
35
views
How to replace the Docusaurus v2 CategoryIndexMatcher?
Our documentation has a package/package/Module.mdx structure, with an index.md at every package level, so also next to Module.mdx. The default CategoryIndexMatcher matches both index.mdx and Module....
1
vote
0
answers
185
views
Can't integrate with Algolia DocSearch
I try to integrate with Algolia DocSearch and it doesn't work.
I followed exactly the steps listed here: https://docusaurus.io/docs/search#using-algolia-docsearch but notwhing happend for more then a ...
0
votes
1
answer
578
views
docusaurus fails to find images after build
I have a Docusauris site that works fine when in development mode, served using npm run start. My docs pages (e.g. docs/GettingStarted.md) include images such as:
<img src="/images/Buttons....
1
vote
1
answer
326
views
Override max width of specific docs (not all docs)
I have a specific "doc" in the "docs" section, for which I need the max width to be bigger (because it contains 2 IFrames side by side).
I see that the guy specifying the max-width ...
0
votes
1
answer
216
views
How i18n works for Docusaurus src/components?
I have i18n perfectly setup and working for themes and plugins of a Docusaurus website.
But for the homepage, I have a component Foo.js located in src/components/Foo.js.
It contains a const Bar = '...
1
vote
0
answers
317
views
Zoom controls on mermaid in docusaurus
I installed the @docusaurus/theme-mermaid plugin in DocuSaurus and rendered my diagram. However, due to the size of the diagram its view becomes small and the zoom and expansion controls are not ...
1
vote
0
answers
69
views
Docusaurus not setting theme on initial render
I'm trying to resolve an issue related with themes on a React website built by Docusaurus.
This problem is most likely related to the fact that data-theme attribute for the html tag isn't being set on ...
0
votes
0
answers
93
views
Encoding in docusaurus
I am using in project German alphabet, so I need to use ü, ä, ö. But instead of this, when I run the server, I got �. How can I fix it?
I thought that I need to add to my static index.html meta data ...
0
votes
1
answer
416
views
Mermaid in tabs
The arrows are not displayed in the second tab. Bug?
It works here https://docusaurus.io/tests/pages/diagrams#mermaid-in-tabs
I have:
a) In "tab-a", the arrows are displayed:
b) But in &...
0
votes
1
answer
93
views
how can I execute a helper method function and run it in Docusaurus's markdown
I have a file that contains Markdown:
# title example
example text that your mind has nothing to do with.
and I want to transform the text to uppercase.
is there any way to write a javascript ...
0
votes
1
answer
120
views
Cannot get createRedirects working with Docusaurus
I am working to put my docusaurs site into "docs only mode" and switch all files to be in the root directory instead of /docs. I have that part done, but I also want to redirect the existing ...
0
votes
1
answer
113
views
Error: Cannot find module './sidebars-api.js'
Trying to start egjs-flicking docs but i am getting an error
I clone egjs-flicking github link and as readme.md got me
before using yarn, install all root path package
npm install
and cd docs,
yarn ...
0
votes
0
answers
103
views
docusaurus swizzle, when I use swizzle of the docusaurus,I get an error: Hook use DocsSideBar is called outside the <DocsSideBarProvider>
when I use swizzle of the docusaurus,I get an error:
I want to ejecting a DocBreadcrumbs component.My project is based on rush, which node_modules is
The reason for the error is that I am missing ...
0
votes
0
answers
15
views
how to change width and height of images in docusaurus [duplicate]
I have a document markdown file:
# Title
<img src='/img/splash-screen.png' height="100"/>
Even if I set a height for the image, it doesn't change and it stays with its original height....