Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tpl/images: Add images.QR function #13212

Merged
merged 1 commit into from
Jan 6, 2025
Merged

Conversation

jmooring
Copy link
Member

@jmooring jmooring commented Jan 2, 2025

Closes #13205

Note that this uses (create.Client).FromString under the covers, which seemed a lot simpler than creating a FromBytes or FromImage method.

Site and theme authors should test the rendered image per the documentation:

Always test the rendered QR code after resizing, both on-screen and in print.

@jmooring jmooring force-pushed the qrcode-13205 branch 2 times, most recently from 98c9ccc to d0029d8 Compare January 2, 2025 19:49
tpl/images/images.go Outdated Show resolved Hide resolved
tpl/images/images.go Outdated Show resolved Hide resolved
@jmooring jmooring force-pushed the qrcode-13205 branch 3 times, most recently from ae08c96 to fa99b36 Compare January 3, 2025 08:17
tpl/images/images.go Outdated Show resolved Hide resolved
@jmooring jmooring marked this pull request as draft January 3, 2025 11:26
@jmooring jmooring marked this pull request as ready for review January 3, 2025 11:33
tpl/images/images.go Outdated Show resolved Hide resolved
tpl/images/images.go Outdated Show resolved Hide resolved
@jmooring jmooring force-pushed the qrcode-13205 branch 4 times, most recently from 76dc38c to 5ca121f Compare January 4, 2025 06:26
tpl/tplimpl/embedded/templates/shortcodes/qr.html Outdated Show resolved Hide resolved
tpl/images/images.go Outdated Show resolved Hide resolved
@jmooring
Copy link
Member Author

jmooring commented Jan 5, 2025

I'll handle styling of the example images on the docs site, so if you build the docs from this repo the examples will be stretched.

@jmooring jmooring force-pushed the qrcode-13205 branch 3 times, most recently from c1e7ff1 to 58c4771 Compare January 5, 2025 15:20
@jmooring jmooring requested a review from bep January 5, 2025 15:22
tpl/images/images.go Outdated Show resolved Hide resolved
@bep bep self-requested a review January 6, 2025 09:58
@bep bep merged commit 4ea94c4 into gohugoio:master Jan 6, 2025
6 checks passed
@jmooring jmooring deleted the qrcode-13205 branch January 6, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add QR code generation to image functions for offline permalinks
2 participants