Card-style Hugo theme designed for bloggers
Go to file
Jimmy Cai 8dc2880a9c
feat: add file types whitelist for image processing (#885)
Add `allowedTypes` and `resizableTypes` to `imageProcessing` configuration

Prior to this commit, SVG images were not processed by `render-image.html` because SVG does not have a physical dimension like JPEG. This logic was done using a conditional.

I have now realised that Hugo can be very slow when resizing `gif` images. So I created this whitelist mechanism:

- `allowedTypes`: image types with width and height attributes
- `resizableTypes`: image types that can be resized

Here's a list of media types: bmp, gif, jpeg, png, svg+xml, tiff, webp

https://gohugo.io/templates/output-formats/#media-types
2023-10-11 22:51:42 +02:00
.devcontainer chore: add Github Codespace config 2021-10-23 06:51:56 +00:00
.github chore: update issue report template to include minimal reproducible example (#864) 2023-08-17 11:15:07 +02:00
archetypes Revert "Merge branch 'canary' into master" (#712) 2022-10-29 17:14:19 +02:00
assets Merge branch 'master' into canary 2023-09-03 16:18:40 +02:00
config/_default feat: add file types whitelist for image processing (#885) 2023-10-11 22:51:42 +02:00
data Revert "Merge branch 'canary' into master" (#712) 2022-10-29 17:14:19 +02:00
docs docs: update demo site link 2023-09-18 14:29:15 +02:00
exampleSite refactor: drop support for external avatar 2023-09-11 18:40:53 +02:00
i18n Merge branch 'master' into canary 2023-09-03 16:18:40 +02:00
images doc: add screenshots 2020-09-13 12:24:07 +02:00
layouts feat: add file types whitelist for image processing (#885) 2023-10-11 22:51:42 +02:00
.gitignore docs: add vitepress cache folder to gitignore 2023-09-18 14:29:54 +02:00
go.mod Revert "Merge branch 'canary' into master" (#712) 2022-10-29 17:14:19 +02:00
LICENSE 🎉 Initial commit 2020-08-22 13:20:08 +02:00
package.json chore: upgrade vitepress to 1.0.0-rc.14 2023-09-18 14:27:49 +02:00
pnpm-lock.yaml chore: upgrade vitepress to 1.0.0-rc.14 2023-09-18 14:27:49 +02:00
README.md docs: update demo site link 2023-09-18 14:29:15 +02:00
theme.toml Revert "Merge branch 'canary' into master" (#712) 2022-10-29 17:14:19 +02:00

image

Hugo Theme Stack

logo

Card-style Hugo theme designed for bloggers.

Quickstart

Use this template: CaiJimmy/hugo-theme-stack-starter

Demo

stack.jimmycai.com/demo

Documentation

Visit stack.jimmycai.com

Licensed under the GNU General Public License v3.0

Please do not remove the "Theme Stack designed by Jimmy" text and link.

If you want to port this theme to another blogging platform, please let me know🙏.