This is a photo gallery demo project for Netlify Large Media made with photos from Unsplash and built with Hugo.
This project has two branches:
Deploy to Netlify with “Deploy to Netlify” button. This will create a new Netlify site and copy the repository to your GitHub account.
Find your newly created repository on GitHub and clone it to your local computer with git clone.
Follow the instructions for Enabling Netlify Large Media to enable Large Media for the newly deployed site.
Specify which files to track using the git lfs track command. The following example tracks jpg and png files. Tracking them is required for this photo gallery, so you can start tracking them:
git lfs track "*.jpg".git lfs track "*.png".Find out more about how to configure file tracking in the documentation.
After making sure you git add and git commit your changes, run git push origin master to push your changes to GitHub. It’ll be automatically deployed to Netlify using Large Media.
When your deploy is done, try running transformations with the image files. For example, you can tweak the layout file at layouts/photos_s/list.html.
This site is built with Hugo, and works with Hugo version 0.42 and above. Run hugo version in your teminal to see if you have Hugo installed. If it’s not installed, or you have a version below 0.42, follow the Hugo documentation to install the current version.
When Hugo is installed, cd into this repository and run:
hugo server
After building the site, the terminal will output the URL for the local server. It will hot reload when you save changes.
static/images folder, and the info to data/photos.json.
.gitattributes file.git add, git commit, then git push to push them to Netlify Large Media!git lfs ls-files, you can double check which files are managed by Large Media.With Netlify Large Media, you can do cool things like image transformation. You can visit the documentation for more detail.