Giter Site home page Giter Site logo

Using / for API reference about redocusaurus HOT 6 CLOSED

jrub avatar jrub commented on May 26, 2024
Using / for API reference

from redocusaurus.

Comments (6)

jrub avatar jrub commented on May 26, 2024 1

@rohit-gohri here you have an example config and page https://github.com/jrub/redocusaurus_test

from redocusaurus.

rohit-gohri avatar rohit-gohri commented on May 26, 2024 1

Figured it out. The id in useSpecData is supposed to be the same id you specify in the docusaurus config (here https://github.com/jrub/redocusaurus_test/blob/63a8e30710d18c586e835ff3d41047f450091a2b/docusaurus.config.js#L66). Let me know if this is not the fix.

I guess it's not very clear in the docs. Added it as a TODO to the existing docs ticket (#147).

from redocusaurus.

jrub avatar jrub commented on May 26, 2024 1

Cool! That worked, thank you 🙏

from redocusaurus.

jrub avatar jrub commented on May 26, 2024

PS: when using yarn build, it fails with [ERROR] Docusaurus server-side rendering could not render static page with path /.

from redocusaurus.

rohit-gohri avatar rohit-gohri commented on May 26, 2024

Are using both the route option and also creating a custom page using index.jsx/tsx file in the pages directory? Then these options might conflict, you can remove one of them and I think it should work.

If you have a link to the repo that would be great to debug this

from redocusaurus.

jrub avatar jrub commented on May 26, 2024

With route completely removed from the config, and using https://github.com/rohit-gohri/redocusaurus/blob/main/website/src/pages/examples/custom-layout/index.jsx as my only src/pages/index , it's stuck on Loading.

However, now I tried to remove all the /src and using route: '/' on config and it loads fine.

Could it be that import useSpecData from '@theme/useSpecData'; does not load at all?

from redocusaurus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.