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

Page navigation not working in docs properly #4097

Closed
Athesh007 opened this issue Jan 20, 2024 · 1 comment · Fixed by #4098
Closed

Page navigation not working in docs properly #4097

Athesh007 opened this issue Jan 20, 2024 · 1 comment · Fixed by #4098
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature

Comments

@Athesh007
Copy link
Contributor

Next page navigation leads to the same page.

Error image:

[link:] (https://js.langchain.com/docs/modules/model_io/)

Copy link

dosubot bot commented Jan 20, 2024

🤖

Hey @Athesh007! Good to see you back. Hope you're coding away happily! 🚀

The issue you're experiencing with the next page navigation in the documentation leading to the same page instead of the next one is likely due to the structure of the sidebars.js file in the documentation.

In Docusaurus, which is the framework used for the LangChainJS documentation, the order of the items in the sidebar determines the next and previous page navigation. If the items are not ordered correctly or if there are missing items, the navigation might not work as expected.

The sidebars.js file in the LangChainJS repository is structured as a module export of an object with three main properties: docs, use_cases, and integrations. Each of these properties is an array of objects representing different categories of documentation. Each category has an items array that contains the documents in that category. The type: "autogenerated" means that Docusaurus will automatically generate the sidebar items based on the filesystem structure in the specified dirName.

However, if there are missing files in the directory or if the files are not named in the order you want them to appear in the sidebar, the next/previous navigation might not work correctly.

To fix this issue, you should check the filesystem structure and the order of the files in the directories specified in the dirName properties. Make sure that all the necessary files are there and that they are named in the order you want them to appear in the sidebar.

If the issue persists, you might need to explicitly define the items in the sidebar instead of using type: "autogenerated". This will give you more control over the order of the items and the next/previous navigation.

Here is an example of how to explicitly define the items:

items: [
  "doc1",
  "doc2",
  "doc3",
  // ...
],

In this example, doc1 will be the first document in the category, doc2 will be the second, and so on. The next/previous navigation will follow this order.

You can find more information about the sidebar configuration in the Docusaurus documentation.

I hope this helps! If you have any other questions or need further clarification, please let me know.

Best,
Dosu

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the auto:bug Related to a bug, vulnerability, unexpected error with an existing feature label Jan 20, 2024
ritvikPuranik added a commit to ritvikPuranik/langchainjs that referenced this issue Jan 20, 2024
jacoblee93 added a commit that referenced this issue Jan 21, 2024
* fixed issue #4097

* Update index.mdx

---------

Co-authored-by: Jacob Lee <jacoblee93@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant