Closed DyncMark closed 4 years ago
Hi,
You can't "create" a docsVersionDropdown, this is a special navbar item type that we introduced.
Please tell me exactly what you want to do and why so that I see what we can do for you.
Hi,
You can't "create" a docsVersionDropdown, this is a special navbar item type that we introduced.
Please tell me exactly what you want to do and why so that I see what we can do for you.
Thanks for your reply. I want a control widget that can switch versions.
But isn't it already what it is?
If it's not working great for you please explain why exactly, I clearly need more than 10 words to be able to help you :)
But isn't it already what it is?
If it's not working great for you please explain why exactly, I clearly need more than 10 words to be able to help you :)
Thanks again for your patient answer!
ooh, I'm sorry, because my English is very poor, so I didn't describe it very clearly.
This is a documentation website, It opens very slowly, cause of I'm in China. So Today I migrate docusaurus from v1 to v2 and it works now, At the same time, I also want to add a version switch to the site. look like
Your config looks fine, but this dropdown only works if you use versioning. Have you already versioned your docs with the cli?
If you share me the source code it's easier for me to see what's the problem.
Your config looks fine, but this dropdown only works if you use versioning. Have you already versioned your docs with the cli?
If you share me the source code it's easier for me to see what's the problem.
Dear friend.
I created a repo, I committed the source code to it, and I invited you to be a collaborator.
The repo is empty, no code was pushed to it.
I suspect your problem is you didn't create any version of your doc with the cli, please tell me if you did that.
If you don't have a "versioned_docs" folder at the root of your site, this dropdown won't do anything
The repo is empty, no code was pushed to it.
I suspect your problem is you didn't create any version of your doc with the cli, please tell me if you did that.
If you don't have a "versioned_docs" folder at the root of your site, this dropdown won't do anything
sorry, please try again.
yes, i create the repo with the cli. like this npx @docusaurus/init@next init my-website classic
@DyncMark I see your code, it looks fine, you have 2 versions + the next one.
Can you show me a live deployment of your site, or at least navbar screenshots or something, to show me exactly what is not working for you?
What do you expect, and what do you get?
@DyncMark I see your code, it looks fine, you have 2 versions + the next one.
Can you show me a live deployment of your site, or at least navbar screenshots or something, to show me exactly what is not working for you?
What do you expect, and what do you get?
This is our website. but it missing versioning, I would like to have a drop-down menu like https://v2.docusaurus.io/ to select different versions of documents.
@DyncMark this dropdown only works in alpha 59, but your live site is not alpha 59.
And the repo you gave me is alpha 59 BUT it does not build at all because you did not fix the errors reported by the error messages.
I tried it locally, quickfixed some errors locally and got this working:
Please be sure to be on alpha 59 and that your site is building correctly.
You will need to rename "links" to "items" in config
You'll need to fix your image paths (+ provide the correct web/source.png image)
And fix your swizzled SearchBar component (I'd actually recommend you to remove your custom searchbar comp, as alpha 59 is using DocSearch v3)
I've pushed a branch "quick-fix-site" to your repo to help you
Hi bro.
I have some problems when I tried to update to alpha59.
first. I change the package.json, and then npm i
{
...
"dependencies": {
"@docusaurus/core": "^2.0.0-alpha.59",
"@docusaurus/plugin-client-redirects": "^2.0.0-alpha.59",
"@docusaurus/preset-classic": "^2.0.0-alpha.59",
...
},
}
...
second, update with npm i @docusaurus/core@next -S
, but get @docusaurus/core@2.0.0-alpha.58
I'm sorry but you can see for yourself that the version exist: https://www.npmjs.com/package/@docusaurus/preset-classic/v/2.0.0-alpha.59
It is likely that you use some kind of NPM chinese proxy that is not updated with latest versions, this is not related to Docusaurus at all.
I can't spend all my day helping you on this, I've already done everything I could, by pushing a working version to your repo. Please reach to other users on Discord to get help.
I'm sorry but you can see for yourself that the version exist: https://www.npmjs.com/package/@docusaurus/preset-classic/v/2.0.0-alpha.59
It is likely that you use some kind of NPM chinese proxy that is not updated with latest versions, this is not related to Docusaurus at all.
I can't spend all my day helping you on this, I've already done everything I could, by pushing a working version to your repo. Please reach to other users on Discord to get help.
sure,I really appreciate your help :), I'll check the problem by my self. Keep safety.
@DyncMark this dropdown only works in alpha 59, but your live site is not alpha 59.
And the repo you gave me is alpha 59 BUT it does not build at all because you did not fix the errors reported by the error messages.
I tried it locally, quickfixed some errors locally and got this working:
Please be sure to be on alpha 59 and that your site is building correctly.
You will need to rename "links" to "items" in config
You'll need to fix your image paths (+ provide the correct web/source.png image)
And fix your swizzled SearchBar component (I'd actually recommend you to remove your custom searchbar comp, as alpha 59 is using DocSearch v3)
I've pushed a branch "quick-fix-site" to your repo to help you
Excuse me! I need your help.
Today I have checkout quickfixed branch, it looks like great, but there are some problems with image is undefined 404
. Do you know what the problem is
sorry but I can't dedicate too much time helping you. Please try to get help on Discord first.
Your image problem might be related to using baseUrl, and this baseUrl is maybe not added in the image path (we made a PR recently so that you don't need to use useBaseUrl hook, but not released yet, so in the meantime you may need that hook, read the doc to know more)
sorry but I can't dedicate too much time helping you. Please try to get help on Discord first.
Your image problem might be related to using baseUrl, and this baseUrl is maybe not added in the image path (we made a PR recently so that you don't need to use useBaseUrl hook, but not released yet, so in the meantime you may need that hook, read the doc to know more)
Thanks for your reply. Because my English is not very good, So I can not find a good solution, but I will always pay attention to you and the official documents. : )
Thanks again.
This is my
docusaurus.config.js
:Has anyone come to help?