Methods
# async ampStoryPageHandler()
ampStoryPageHandler gets all the things needed and calls "ampifyStory" function (which comes from ampLib) From ampifyStory's perspective,
- ampConfig is /api/v1/amp/config
- publisherConfig is /api/v1/config
- additionalConfig is an obj containing any extra config. If the publisher passes an async function "opts.getAdditionalConfig", its returnd value is merged into additionalConfig. Use case - Ahead can use this to fetch the pagebuilder config
- to set timezone in structured data on amp pages, set it in blacknight Ex: publisher.yml-> publisher->timezone:“Asia/Kolkata”
# getDomainSpecificOpts(opts, domainSlug) → {Object}
Pick the correct opts for the subdomain Uses the config for main domain as a fallback for subdomains. i.e. if a user us on entertainment subdomain and if opts.entertainment.slots is an empty obj, take opts.slots as a fallback
Parameters:
Name | Type | Default | Description |
---|---|---|---|
opts |
Object
|
the opts object coming from FE app |
|
domainSlug |
string
|
null
|
undefined
|
null | the domain slug as specified in publisher.yml under domain_mapping |
The correct opts object for the domain/subdomain
Object