This was built for photos.mrarich.com but the source is reusable, at least as a starting point.
- Paginated gallery
- "Reactive" image sizing to save bandwidth on mobile
- RSS Feed (feed.php)
- Caching
- Keyboard navigation
- Tag filtering
- URL navigation
- Automatic EXIF data display
- Probably some bugs
- Run
npm installto install dependencies. - Add an
imgdirectory in thepublicfolder.- The images should match
IMG_X.JPG. The format can be updated inutils.ts. - You can experiment with image sizes. In most places the image is resized on the server to conserve bandwidth, so whatever size is used will likely be reduced before being displayed anywhere.
- To save time/space/energy, you should also just put the
imgdirectory in your webserver root and make sure to not overwrite it when copying output files.
- The images should match
- Update
manifest.json - Update links throughout
- Update
.env - Update logos in
public - Update
favicon.ico - Update
tags.jsonwith your own tags - Run
npm run startto test - Run
npm run buildto build- Copy output build directory to your apache webserver
In the project directory, you can run:
npm run start: Runs the app in the development mode.npm run test: Launches the test runner in the interactive watch mode. (No tests for now 😬)npm run build: Builds the app for production to thebuildfolder.