kc0bfv / autophugo

AutoPhugo [ˌɔtoʊˈfjuːgəʊ] is a gallery/photoblog theme for Hugo that's a little more automatic than Phugo.
Other
97 stars 56 forks source link

Allow to overwrite resize logic to support restriction by height (mak… #30

Closed githubmonkey closed 2 years ago

githubmonkey commented 2 years ago

This RP is a bit strange. Since I am moving my fork back towards an optional row-based layout in the long run, it really makes more sense for me to restrict images by height rather than by width. However, I don't want to add more noise to the config files, since I assume most people will go for the default.

As a compromise, this change adds a "hidden feature:": IF an explicit and hopefully valid thumb_size string is specified, thumb_width and thumb_quality will be silently ignored. Same with full_size.

A common setting in my config would be this, replacing the default width/quality settings: thumb_size = "x320 q50" full_size = "x1060 q90"

As I expect most people to embrace the default column-based design, I decided to not even document the extra option for now. This is clearly for the power user only :-)

kc0bfv commented 2 years ago

Love it. I think the logic you implement is equivalent to "default" - if the param is unset, use the printf version. If it is set, use it. So I replaced it with just a default... Please let me know if I'm missin' something ;-) On curver now.

kc0bfv commented 2 years ago

It's on main now!