1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 00:52:19 +01:00
hugo-theme-bootstrap4-blog/layouts
Alan Orth 147ee8cf76
layouts/shortcodes/figure.html: Add srcset support
This overrides Hugo's default figure shortcode to enable img srcset
support, which allows the client to decide which size of image they
want to download based on a CSS media query. During build time Hugo
creates several versions of each image to match several breakpoints.
Unfortunately this only works if the images are in the post's page
bundle, falling back to retrieving images from the static directory
if they aren't found in the bundle.

This shortcode was originally from Charl P. Botha, but I modified
it to automatically rotate images that have orientation EXIF data.

See: https://gohugo.io/content-management/page-bundles/
See: http://www.johann-oberdorfer.eu/blog/2020/01/05/20-01-05_leverage_page_bundles_in_hugo/
See: https://cpbotha.net/2020/05/02/drop-in-replacement-for-hugo-figure-shortcode-with-responsive-img-srcset/
2020-12-04 14:03:29 +02:00
..
_default Allow content without PublishDate, eliminates extraneous date output. 2020-10-29 12:53:14 +03:00
partials layouts: Fix error in Haven invocation 2020-05-17 22:45:23 +03:00
shortcodes layouts/shortcodes/figure.html: Add srcset support 2020-12-04 14:03:29 +02:00
404.html layouts/404.html: Add minimal not found page 2018-01-14 05:49:55 +02:00
robots.txt Support baseurl without trailing slash 2019-06-04 00:26:09 +02:00