Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docusaurus v3 Support #205

Open
bahadirarslan opened this issue Apr 25, 2024 · 17 comments
Open

Docusaurus v3 Support #205

bahadirarslan opened this issue Apr 25, 2024 · 17 comments
Labels
enhancement New feature or request

Comments

@bahadirarslan
Copy link

Docusaurus has been updated to v3 recently, but this package doesn't support it yet.

Are you planning to update this package to support v3? We would appreciate it if you will.

@HLeithner
Copy link

Workaround:
#199 (comment)

PR waiting to get merged
#204

I'm not sure if @cmfcmf has abandoned this project.

@bahadirarslan
Copy link
Author

Workaround: #199 (comment)

PR waiting to get merged #204

I'm not sure if @cmfcmf has abandoned this project.

Thank you, this was helped. But I also needed to add @docusaurus/theme-common as dependency. This was not mentioned anywhere but the build threw an exception because of this missing dependency.
Anyway, now it works like a charm.

@cmfcmf
Copy link
Owner

cmfcmf commented Apr 29, 2024

I'm not sure if @cmfcmf has abandoned this project.

Unfortunately, I did not find enough time to work on this project over the last few months, but I hope to get back to it some time this week to at least make sure that Docusaurus 3 compatibility is tested and working. Sorry everyone for the wait 😓

@HLeithner
Copy link

I'm not sure if @cmfcmf has abandoned this project.

Unfortunately, I did not find enough time to work on this project over the last few months, but I hope to get back to it some time this week to at least make sure that Docusaurus 3 compatibility is tested and working. Sorry everyone for the wait 😓

Don't worry, take the time you need and of course thanks for your work on this project.

@apotecbec
Copy link

@cmfcmf thanks for working on this! Do you have any indication of an ETA for when this plugin might become compatible with Docusaurus v3?

@cmfcmf cmfcmf added the enhancement New feature or request label Jun 9, 2024
@cmfcmf cmfcmf pinned this issue Jun 9, 2024
@cmfcmf
Copy link
Owner

cmfcmf commented Jun 9, 2024

I made some progress today and merged a few changes for Docusaurus v2, as well as updated the GitHub Actions workflow to test on the latest Node.js and Docusaurus v2.x versions.

Unfortunately, I did not get to adding support for Docusaurus v3 today. The PR (#204) is currently missing at least a) an update of the GitHub Actions workflow file to test with Docusaurus v3 as well b) an update of packages/example-docs to Docusaurus v3 (even better if we can have one example docs for v2 and one for v3) c) raising the minimum Node.js version to 18. If anyone would like to help with that, so I can release a new version of this plugin that is compatible with Docusaurus v3, please go ahead and send a PR (or coordinate with @fooku18 to update their PR).

Otherwise I hope to get to this next weekend.

@nanditha938
Copy link

When using the search plugin (v1.2.0) on Docusaurus v3.4 and v3.3.2, incorrect URLs are being generated while accessing the level 2 topics from the search results.

URL error: {url}/docs/filename/docs/filename#level2topic

Whereas on a new Docusaurus site (neither versioned nor contains multiple docs) the search capability works in v3.3.2 but yields incorrect URLs in v3.4.

@fartbagxp
Copy link

I encountered a similar problem after upgrading to v1.2.0 with Docusaurus v3.4; the search results seem to be double appearing at times, and providing incorrect URLs.

@Pyenb
Copy link

Pyenb commented Jun 21, 2024

I am having the same problem, with the only difference being, that even after reverting to v3.3.2 in the main and overwrite, the issue still persists.

I will look forward to any updates on this thread 👍

@fartbagxp
Copy link

I am having the same problem, with the only difference being, that even after reverting to v3.3.2 in the main and overwrite, the issue still persists.

I will look forward to any updates on this thread 👍

You can downgrade to cmfcmf/docusaurus-search-local to v1.1.0 and keep docusaurus v3.4.0.

@Pyenb
Copy link

Pyenb commented Jun 22, 2024

I am having the same problem, with the only difference being, that even after reverting to v3.3.2 in the main and overwrite, the issue still persists.
I will look forward to any updates on this thread 👍

You can downgrade to cmfcmf/docusaurus-search-local to v1.1.0 and keep docusaurus v3.4.0.

I did, but the issue still seems to be present. Or did I do something wrong?

here are my dependencies:

  "dependencies": {
    "@cmfcmf/docusaurus-search-local": "1.1.0",
    "@docusaurus/core": "^3.4.0",
    "@docusaurus/plugin-client-redirects": "^3.4.0",
    "@docusaurus/preset-classic": "^3.4.0",
    "axios": "^1.7.2",
    "clsx": "^2.1.1",
    "express": "^4.19.2",
    "prism-react-renderer": "^2.3.1",
    "react": "^18.3.1",
    "react-dom": "^18.3.1"
  },
  "devDependencies": {
    "@docusaurus/module-type-aliases": "^3.4.0"
  },

EDIT: I removed the "^" from all the docusaurus dependencies, as not update them to the next minor version and now everything is back up working again. Thanks everyone for the help 👍

@MoonchainMaxi
Copy link

I exercised all suggested solutions, including running different builds and dependencies. However, the issue persists on all of them.

Somehow the /blog/ urls showcased in the search dropdown menu are generated correctly, the /doc/ ones are now.

@apotecbec
Copy link

hey @cmfcmf, thank you for continuing to work on this. How are things going with the Docusaurus v3 compatibility? If you have a rough ETA you could share, that would be most helpful to know.

@Ueland
Copy link

Ueland commented Jul 2, 2024

I exercised all suggested solutions, including running different builds and dependencies. However, the issue persists on all of them.

Can confirm the same issue, had to downgrade Docusaurus to v3.3.2 to get search working again.

@sibelius
Copy link

sibelius commented Jul 7, 2024

is there a pull request for this ?

@slorber
Copy link

slorber commented Aug 12, 2024

Note: I reverted the Docusaurus v3.4 change to unbreak local search plugins in v3.5.

Related to:

But v3.5 has another issue, please wait until I publish v3.5.2 with a fix for #217

@slorber
Copy link

slorber commented Aug 13, 2024

Docusaurus v3.5.2 has been released and should work fine with this plugin (I tried with v1.2)


Note: you may get another error while building your site.

[ERROR] Error: Unable to build website for locale en.
  ...
  [cause]: TypeError: Cannot read properties of undefined (reading 'load')
      at getDocusaurusTag (.../@cmfcmf/docusaurus-search-local/lib/server/parse.js:194:33)
      at .../@cmfcmf/docusaurus-search-local/lib/server/index.js:288:60

It is a different issue, related to a recent release of Cheerio v1.0 that did unexpected breaking changes. See my PR for details and workarounds: #218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests