-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
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
Document how to produce a "json feed" containing all content as single JSON file #2312
Comments
We don't have a good way to do that at the moment as we don't aggregate the data model during the bootstrap process into one single data structure, unlike Gatsby. Contents and data fetched within each plugin is scoped to that plugin. The only overall site-wide data we have is the routes, which is used by But what you have proposed is a step in the right direction. In future, we would try to have similar APIs to build data models in plugins which can be processed downstream in subsequent plugins. |
The
Take a look at the official debug plugin for inspiration, as it access the data of all the plugins: https://docusaurus.io/__docusaurus/debug/content There's also a plan to be able to extend existing content plugins, in case you want to do something with the loaded data of a single plugin. Check #4138, issue is a bit messy though, and there's no official API for this yet but you can work around that. |
Migrated from v2 to v3 ... and there is no longer |
@kesor this is something we never documented because I wasn't sure it was a good idea. We later refactored it to another lifecycle method you can try More context here: #9931 |
📚 Documentation
Similar to Hugo's index.json. I would like to know how to make a JSON output representing all site content and metadata. Like this:
https://www.screencast.com/t/a3spUYaU1J0
This supports a variety of downstream transformations of site content, such as building a custom Algolia index, transforming to other output formats, etc.
Could someone document or suggest how to do this?
Thanks!
Stu
Have you read the Contributing Guidelines on issues?
yes
The text was updated successfully, but these errors were encountered: