Photon is a fast and straightforward way to publish your photos with 11ty. The process is easy while the website is blazing fast and comes without any tracking or other junk. All you need is a bit of Git knowledge and a place to host your 100% static website.
A live example, running the main branch of this repository, is available on photon-11ty.netlify.com.
You can get started very quickly by deploying Photon - 11ty
to Netlify. Press the Deploy to Netlify
button and you are up and running.
/uploads
& /posts
/uploads
directory. Keep in mind, you don't do any image optimization beforehand. Photon will resize and optimize the images during its build process.Photon has two simple rules:
/uploads
directory./posts
directory. This markdown file handles everything from referencing the image you want to show to handling additional metadata for this specific post.A post looks like this:
---
layout: layouts/photo.njk
date: 2020-03-01
caption: Test 1
imageSource: andy-feliciotti-YNkjiFhMtck-unsplash.jpg
imageAlt: This is the alt text
---
layout
: Don't change this! This is the template your photo will be render in.date
: This is the published date of this post. You can set it to everything you want, but please stick to the formatting (YEAR-MONTH-DAY)caption
: A simple caption for your imageimageSource
: Reference the file name of the photo you want to reference. Photo looks inside /uploads
to find it.imageAlt
: Add a simple alternative text describing the image. This can help people who depend on assistive technologies like screen reader.language
: Add the HTML language code to tell the primary language you are using on your site to the browser. Default en
title
: Give your site a proper titleurl
: Enter the URL your site is going to live onslogan
: Give your site a quick summary. This will be available on your homepage.favicon
: Customise your favicon with an emojiauthor.name
: Add your name hereauthor.email
: Add your email address here, so people can contact you if you wantseo.title
: Add a SEO title here. Used on the homepage.seo.description
: Add a SEO description here. Used on the homepage.social.twitter
: If you want to link to your twitter account, add it here. A reference will be displayed in the homepage.social.instagram
: If you want to link to your Instagram account, add it here. A reference will be displayed in the homepage.This project is based on the fantastic 11ty. It was a little inspired by the awesome Photo Stream project made by Tim Van Damme. The pictures displayed on the demo version are all coming from Unsplash.