Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 899 Bytes

README.md

File metadata and controls

30 lines (22 loc) · 899 Bytes

AngelinaBecerra.com Readme

Adding new images

  1. Copy folder of images to public/galleries.
  2. Add folder to getStaticPaths in pages/gallery/[folderName].tsx.

Gallery Configuration

By default, the build script will order the pictures based on the filename. However, you can override this behavior by specifying a gallery configuration . Include a file named config.json in an image folder to give the script some additional information.

Sample gallery.json

{
  "images": [
    { "filename": "1.JPG" },
    { "filename": "3.JPG" },
    { "filename": "7.JPG", backgroundPosition: 'top center' },
    { "filename": "2.JPG" },
    { "filename": "8.JPG" },
    { "filename": "12.JPG" },
  ]
}

Options

  • filename
  • backgroundPosition - Optional - The CSS background position for the image. This is used in the gallery view for the image thumbnail.