Open manastalukdar opened 5 years ago
/*
** Hooks configuration
* https://toor.co/blog/amp-pages-using-nuxt-js/
*
hooks: {
// This hook is called before saving the html to flat file
'generate:page': page => {
if (/^/gi.test(page.route)) {
page.html = ampify(page.html)
}
},
// This hook is called before serving the html to the browser
'render:route': (url, page, { req, res }) => {
if (/^/gi.test(url)) {
page.html = ampify(page.html)
}
}
}
*/
References: