This repository contains the source code of liveinestonia.com, a photo blog project about living in Estonia by Asep Bagja Priandana.
You can fork and use the source code for your photo blog too.
- Google Photos as a content management system.
- Next.js as a static site generator
- Node.js version >= 16
You can deploy it anywhere. Live In Estonia is deployed on Vercel.
Before using this project, you must have a Google Photos account.
- Create an album.
- Upload all your photos to that newly created album.
- You can put the description of the photo from Info menu.
- Get the ID for that album.
- Put it in
.env
file (don't forget to rename it from.env.example
).
Note
There is no easy way to get the album ID without writing a code to fetch this endpoint.
You can follow the guide from Google about how to get the access credential from Google Cloud Platform: the guide.
Note
When creating the credential choose "Desktop application" instead of "Web application".
Download google-secret.json
file from this process, and put it in the root of this repository.
This project is using Static Site Generator feature of Next.js. Thus, we need to prepare the data before building Next.js
- Fetch all photos from Google Photos by running
yarn get-photos
. Follow the authentication process that happens when you run that CLI command. - After the process is completed, you will have
posts.json
file insidedata
directory.
You can run it by using yarn dev
command.
Enhance yarn get-photos
command to get the album ID
easily without put it inside .env
file.
This project is licensed under MIT, you can use it freely and as it is.
Happy photo blogging! 📸😄