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.
503
questions
-1
votes
0
answers
14
views
how to write component demo using docusaurus [closed]
I'm using docusaurus V3 to write a React component libarary. I did not know how to write demo like this:
is there any plugins can help to implement?
1
vote
1
answer
99
views
how to serve a static sub site as part of svelte app
I'm trying to integrate docusaurus to my svelteKit app, as a documentation for my devs. I would like to build my doc to static files and then serve them under the /doc endpoint of my app.
Problem : I ...
-1
votes
0
answers
17
views
Docusaurus won't translate category name
My docusaurus project is structured like this:
docs
|--mycategory
|--_category_.json
i18n/de/mypage/current
|--mycategory
|--_category_.json
When I run the page with npm run start -- --locale de
...
0
votes
2
answers
457
views
make a code preview for documentation with Reactjs
I'm trying to create a component who display source's code passed as props to write documentation of a library i work on with Docusaurus. Like html <code> or exactly like this (the blue part) :
...
0
votes
0
answers
9
views
Custom PrismJS Grammar Not Working in Docusaurus 3
I am not a react dev so maybe I'm missing something. Any help is much appreciated. I have a Docusaurus 2.2 site in which I've implemented a Prism grammar for a DSL we use. In Docusaurus 2.2, ...
0
votes
1
answer
19
views
How to render math formulas in docusaurus v2 for a separate page (not in "docs" folder)?
I can successfully render math formulas in docusaurus v2 in all documents (contained in docs folder), but I would like to create a separate document (referenced from top site bar) with some ...
1
vote
1
answer
31
views
How to add Share button to every blog post in Docusaurus?
Is there a way to add Share button to every blog post in Docusaurus using the docusaurus.config.js?
0
votes
0
answers
17
views
Sidebar won't autogenerate with docs multi-instances on Docusaurus
I'm sure I'm making some stupid basic error here, but I cannot get the sidebar to autogenerate for my second docs instance.
I've followed the guide here: https://docusaurus.io/docs/docs-multi-instance#...
0
votes
1
answer
43
views
Invalid URL in field "id" (in "itemListElement.item") for a Docusaurus website
We have a website made with Docusaurus "2.0.0-beta.18". I'm improving its SEO by inspecting its pages in Google Search Console. For most of its page, I realize that there are 2 non-critical ...
0
votes
0
answers
10
views
NodeJS pkg: can you package docusaurus into executable?
Hi I wanted to package docusaurus project o an executable, but I don't known where to start and is it even possible. Did someone try to do this and found out how to prepare configuration for it? I ...
0
votes
1
answer
107
views
How to add buttons in Table Of Content (TOC) or below TOC in Docusaurus?
I want to add custom buttons below auto generated Table of Content.
Ideally , I want to use the space below TOC to add my custom buttons.
Or maybe i could create a plugin that would generate TOC ...
2
votes
1
answer
494
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://www.mywebsite.com/docs/a-page. If I reload the page, ...
0
votes
1
answer
30
views
Specific title and keywords for non-english versions of a docusaurus website
I have a website made by docusaurus 2.0.0-beta.18. Initially it was in English, then I added Chinese version for many pages with i18. So a page like https://www.mywebsite.com/zh-CN/docs/a-page ...
0
votes
0
answers
18
views
Unsupported specification error with Redocusaurus plugin
I am creating .yml files from an ASP Net Core API using docFx version 2.73.2.
When I try to create a Docusaurus site using the Redocusaurus plugin I receive an Unsupported Specification error.
docfx ...
0
votes
0
answers
13
views
How to make Docusaurus work with ESM only package?
I am authoring a TS library that compiles to ESM-only package and has "type": "module" set in its package.json file. For the same package, I am trying to generate documentation ...
0
votes
0
answers
25
views
Canonical and alternate URLs of a docusaurus website with 2 locales
I have a website made with Docusaurus. Initially it was in English, then I added Chinese version for many pages with i18. So a page like https://www.mywebsite.com/docs/a-page displays in English and ...
0
votes
0
answers
17
views
Not all locales are generated in sitemap.xml of a docusaurus website
I have a website made by docusaurus 2.0.0-beta.18. Initially it was in English, then I added Chinese version for many pages with i18. So a page like https://www.mywebsite.com/zh-CN/docs/a-page ...
0
votes
0
answers
23
views
"ProtocolError: Runtime.callFunctionOn timed out" while creating PDF for Docusaurus site using Puppeteer docs-to-pdf
I am trying to generate a PDF from a Docusaurus site using the docs-to-pdf tool. I successfully did that for a smaller site but I get this error on a medium-sized website. I can't find a way to ...
0
votes
1
answer
30
views
How to create a component that imports static content?
I would essentially like to do this:
import React from 'react';
import CodeBlock from '@theme/CodeBlock';
export function MyCode({fileName}) {
const rawText = import('!!raw-loader!@site/static/' + ...
1
vote
1
answer
46
views
Docusaurus adding tracking google analytics
I have seen some posts about the plugin to add in docusaurs documentation, to track with google analytics.
But I tried several methods, and I don't see the track in the google dashboard.
I tried in ...
0
votes
0
answers
13
views
docusaurus won't pick up my translated markdown files
My docusaurus project structure:
website
|--docs
|----homepage.md
|--i18n/de/docusaurus-plugin-content-docs/current
|----homepage.md
When I use the language switch I get directed to http://localhost:...
0
votes
1
answer
232
views
How to configure docusaurus config keys conditionally?
If a user needs to configure an optional docusaurus config key based on some condition, what is the best way to address it in docusaurus.config.js file? For example:
module.exports = {
/* If ...
0
votes
1
answer
29
views
Docusaurus with DropInBlog render issues
I'm trying to use DropInBlog with Docusaurus instead of using its own inbuilt blog functionality.
According to DropInBlog implementation should be straight forward.
Add a script tag to the page body ...
0
votes
0
answers
44
views
Vercel gives me a error while deploying a Vercel site
Vercel gives me a error while deploying a Vercel site.
Here is the repo: https://github.com/Mrdev88/useimg
Here's the error:
[20:14:55.571] Running build in Washington, D.C., USA (East) – iad1 (Hive)
[...
0
votes
0
answers
18
views
Gitlab Pages Tab doesn't appear
I'm trying to deploy a static docusaurus website with gitlab pages but the "Pages" tab (which should be in "Deploy" tab) doesn't appear.
Here's my CI file :
image: $...
0
votes
0
answers
31
views
How to parse a local CSV file with react and docusaurus?
I have been trying to implement a graph on a website I am working on and I need to display sensor data. Currently I am using the react-chartjs-2 and a JSON file to display the data. However I was ...
0
votes
0
answers
22
views
Docusaurus multi-instances and multi-searchs
I'm trying to integrate 3 documentation individually into a single docusaurus app.
in case of creating multiple instances of the same app, I managed to solve it. The biggest problem is thinking about ...
4
votes
1
answer
337
views
Docusaurus implementation in existing react project
I am having one exiting react app and I want to embed Docusaurus into it to have documentation site.
Till now I have build the Docusuarus and put all the files/folder inside /build folder of ...
1
vote
1
answer
55
views
How to center all markdown tables in docusaurus?
I specify tables in docusaurus documents with markdown (this way my markdown editor inserts tables), as shown below:
text text text text text text text text text text text text text text text text ...
0
votes
2
answers
2k
views
How to link downloadable files in docusaurus?
I want to link downloadable content on my documentation and I tried putting in a link like this:
<a
href={
require("@site/static/img/04-api/01/API-Description.png")
.default
...
5
votes
4
answers
3k
views
How to include (import) markdown file content in Docusaurus V2?
Is there any way to include markdown file content into another markdown file in Docusaurus V2? I'm trying to organize my docs folder structure.
When we create a markdown file, e.g. in docs, Docusaurus ...
4
votes
4
answers
2k
views
How to add icon in the headerLinks in Docusaurus project
To add headerLinks, code is
headerLinks: [
{ doc: "introduction", label: "Docs" },
{ doc: "faq", label: "FAQ" },
{
href: "https://github....
0
votes
0
answers
19
views
Docusaurus. Sidebar is unique per page, bug or feature?
In docusaurus, if we declare the same doc in 2 sidebars, the sidebar is not respected and the doc always will show the last sidebar declaration, not matter from where the doc is accessed.
sidebar1: [...
1
vote
2
answers
467
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, ...
0
votes
0
answers
24
views
How to set up redirect in docusarus via plugin @docusaurus/plugin-client-redirects
In my docusarus page I'd like to set up a redirect:
from example.com/docs and example.com/changelog
to example.com/docs/intro/ and example.com/docs/changelog/ respectively
I installed the plugin @...
1
vote
1
answer
1k
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
46
views
Docusaurus v2 change Navbar collapse breakpoint
With Docusaurus v2, I'd appreciate if anyone could point me in the right direction for figuring out how to change the breakpoint when the navbar collapses into mobile navbar (hamburger menu). Or just ...
0
votes
0
answers
18
views
Make a strong link to a category (verified by the compiler)
To make a link to another page I can use the file path like presentation/thomas.mdx, like that if the file does not exist the compiler errors.
But I also want to use categories in the sidebars.js (...
1
vote
1
answer
774
views
My Docusaurus docs multi-instance ended up with two navbar links that go to the same intro.md file, but I don't know why
I'm making a Docusaurus site with two separate sets of documentation. One set of documents is for our website content creators and the other is for site development documentation.
I followed ...
2
votes
2
answers
1k
views
Access site config in Docusaurus markdown doc
I'm trying to configure custom configuration variables according to the docs.
I added the following section in the docusaurus.config.js
customFields: {
foo: 'bar',
},
And in my .md file I ...
0
votes
0
answers
26
views
Docusaurus Expected corresponding JSX closing tag for for large volume load
I am working on using Docusaurus to create a central location for markdowns coming from many sources, I have written a GitLab plugin to load data from GitLab by querying the GitLab API using Axios and ...
0
votes
0
answers
39
views
Running create-docusaurus from an electron app works in dev, but not in built app
I am using the electron-react-boilerplate to package my app and I am trying to execute a command to create a docusaurus project in my packaged app. It works all good when runnning it in dev mode, but ...
0
votes
1
answer
56
views
How to exclude a folder from build on Docusaurus?
I am using Docusasurus for documenting the APIs. There is a subfolder created to store the development-related files that should not be part of Docusasurus build. I disabled it from the sidebar but I ...
0
votes
1
answer
187
views
Docusaurus versionning
If I do not want to show this next in the dropdown nav menu, what should I do?
Checked the docusaurus documentation too, but could not understand.
3
votes
1
answer
439
views
Docusaurus v2 set security headers
In Docusaurus v2 I want to implement some security headers. But I couldn't find any documentation about security headers in Docusaurus.
Here are some header I want to add, especially to prevent other ...
24
votes
5
answers
8k
views
How can I add custom scripts in index.html's head part in Docusaurus V2?
We are making a website with Docusaurus V2.
In Docusaurus V1, there is a scripts setting in siteConfig.js to cusutimize html's head content. But, I cannot find the corresponding setting in Docusaurus ...
4
votes
1
answer
1k
views
How to reference files outside of Docusaurus root folder
My team and I are looking to implement a documentation system that allows engineers to put markdown files within a specified folder in each of their service root directories. Since we are in a ...
1
vote
0
answers
38
views
How to get Docusarus sitemap in local build?
I've had one sitemap question before (Where do I control sitemap for Docusarus?), so this is kind of an extension to that question. On the documenataion page (https://docusaurus.io/docs/api/plugins/@...
0
votes
0
answers
44
views
Set custom meta title for subsections
I have a Docusaurus site with a blog and two subsections (Knowledge Base, Topics): https://uplink.tech/blog/
All of them use the title defined in docusaurus.config.js (module.exports = { title: '...
1
vote
1
answer
89
views
Add section above the copyright in the docusaurus.config.js file
I'm currently working on customizing the footer of my Docusaurus documentation site, and I'd like to include "Links" section with icons and links right above the copyright information.
The ...