-
Notifications
You must be signed in to change notification settings - Fork 1
Page Builder Integration
Shraddha Kesari edited this page Jan 25, 2021
·
3 revisions
- The page builder configuration present in the Ahead is sent to framework via an async function.
- Framework accepts it and sends it to amp library.
- Amp library accepts it as an additional config and sends it back to Frontend through framework.
- The below function needs to be added in the Ahead front end which gets the Pagebuilder configuration along with other configurations.
const additionalConfigGetter = async ({ story, apiConfig, ampApiConfig, publisherConfig }) => {
const additionalConfig = await getPbConfig(publisherConfig, apiConfig);
return additionalConfig;
};
- apiConfig: api/v1/config
- ampApiConfig: api/v1/amp/config
- publisherConfig: publisher.yml / blacknight config
- Key named
getAdditionalConfig
with value ofadditionalConfigGetter
should be added to ampRoutes in Ahead. As the name suggests, it is getting the additional config i.e., the above mentioned configurations.
getAdditionalConfig: additionalConfigGetter
- Now, Pagebuilder is integrated with Amp Library.