How to generate just 1 page ex. index.html

Add an output format to build a JSON file when you build your site. It will be an array of pages containing title, relative permalink, and summary.

The JS on the home page would select 10 random elements from the JSON array, iterate through the list, and render.

If your site has 1 million pages the JSON file will be too large. Find a way to limit its size. You could:

  • Include the last N pages created, or
  • Select N random pages

N might be 100, 200, 500. It’s a trade-off between size/performance and content variability.

In either case, rebuild the site when you (a) create new content, or (b) once every few days.