Minimalistic portfolio app made with Go. If you don't want to play with databases or complex album hierarchies, this is for you.
This app is build around the file system, eliminating the need for an admin UI. It also simplifies the process of backing up and restoring your data.
NOTE I'm planning a pretty big rewrite, because I need a few more features and the current approach is just too difficult to use. Expect things to be broken!
- File based - no databases needed!
- Automagic thumbnail generation
- Atom feed
- Respects light/dark mode set in the browser
To get started, follow these steps:
- Clone the repository with
git clone https://github.com/saaste/portfolio.git
- Copy the two example files to their respective names:
- settings.yaml.sample ➔
settings.yaml
- docker-compose.yaml.example ➔
docker-compose.yaml
- Adjust the settings in the newly created
settings.yaml
file according to your preferences. Here is a breakdown of the settings you can customize:
Setting | Description |
---|---|
smallSize | Maximum size for small thumbnails |
mediumSize | Maximum size for medium thumbnails |
baseUrl | Base URL |
refreshInterval | How often photos are refreshed (e.g 10s, 15m, 1h) |
title | Title of the portfolio |
description | Description used in Open Graph meta tags (social media preview) |
author | Author of the photos |
aboutTitle | Title of the about page. Also used in the link text. |
about | Text for the About page. HTML tags are allowed |
theme | Used theme |
- Optionally, you can add your own styles to
ui/static/custom.css
. You can also customize the templates in theui/templates
directory but keep in mind that these files are in the source control and can change in the future.
The only requirement is Go. You can start the app with:
go run main.go [--port PORT]
By default the app will run on port 8000.
The only requirement is Docker. You can start the app with:
docker-compose up
By default, the app listens on port 8000. You can modify the port in the docker-compose.yaml
file.
The app automatically generates small and medium thumbnails for each new image. If you want to refresh thumbnails for all existing images, you can use the following command:
go run main.go --generate-thumbnails
To add new images, simple place them in the files
directory. The app will periodically check for new
images based on the refreshInterval
setting. If you wish to see the new images immediately, restart
the app.
Please note that only JPG and PNG formats are supported.
Despite the minimalist design, it is recommended to provide an alt text for the visually impaired. You can do this by saving the text in a .txt file that has the same name as the photo.
For example:
- Photo: DSCF3408.jpg
- Alt: DSCF3408.txt