Programmatically generated pages

Lost Pixel config can reduce boilerplate in your Page shots. If you can programmatically generate the list of pages and make them accessible to Lost Pixel, it will function as well as providing them manually:

module.exports = {
  pageShots: {
    pagesJsonUrl: '',
    baseUrl: '',

  lostPixelProjectId: 'YOUR_PROJECT_ID',
  apiKey: process.env.LOST_PIXEL_API_KEY,

pagesJsonUrl In this case, it returns the list of pages like Lost Pixel expects them:

 pages: [{ path: '/app', name: 'app' },{ path: '/blog', name: 'blog' }],

Last updated