-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
adamlaska/osmos-cosmos-sdk
#5Labels
type: feature requestRequest to add a new featureRequest to add a new feature
Description
Feature request
What problem does this feature solve?
Using a generated sidebar that is based on dynamic content. I'm fetching content before running vuepress build and as a workaround I now write the data needed for the sidebar in a JSON file and then synchronously read it. Instead it would be better to fetch the content and generate the sidebar in one go so no temporary file is needed.
What does the proposed API look like?
Two options, either the config export could return a Promise or the sidebar value can. E.g:
const fetchContent = () => Promise.resolve();
const generateSidebar = () => Promise.resolve({});
module.exports = {
sidebar: fetchContent.then(generateSidebar),
}
How should this be implemented in your opinion?
Going with the sidebar example vuepress could check if the sidebar
value is a Promise or not before building, which would also be backwards compatible.
Are you willing to work on this yourself?
Maybe, depending on the complexity of the change since I have no idea how far changing the code goes to make a part of the config resolution async.
intijk
Metadata
Metadata
Assignees
Labels
type: feature requestRequest to add a new featureRequest to add a new feature