Page's ID applied to body as `data-wc-page-id`. Can be accessed via CSS and JS to perform page-specific styling or integrations.
Also, introduces new page parameters, similar to widget params:
design.css_style
design.css_class
Close#1975
New options:
`theme="light"` inverts image when browsing in dark mode
`theme="dark"` inverts image when browsing in light mode
`max_width="300px"` sets an image max width
Also, improves use of Figure in `{{%` Markdown shortcodes (e.g. Callout) by further stripping HTML indentation.
Based on user request to parse both Markdown and nested HTML shortcodes (Figures) within Callout shortcode: https://discord.com/channels/722225264733716590/742863504515793149/813105748283883570
Uses `{{-` to unindent HTML so that Figure shortcode can be nested within a `{{%` Markdown shortcode, such as Callout, without the HTML being rendered as a Markdown code block. This way we utilise Hugo's HTML in Markdown approach (aka Goldmark `unsafe`) rather than separating HTML from Markdown.
Previously, Figure could only be nested within a `{{<` HTML shortcode.
The file uploader in Wowchemy CMS has also been updated to reflect the change.
BREAKING CHANGES:
- rename assets/images/ to assets/media/
- move default social sharing image (if any) to assets/media/sharing.*
Workaround HasShortcode detection issue by defaulting to requiring fancybox. Can temporarily be disabled by setting `site.Params.require_fancybox` to `false`
Cacheable, zoomable, and lazily loaded.
Also, prevents conflicts if admin attempts to include multiple inline SVGs which unintentionally reuse each other's components.
New shortcode supports
- enable re-usable *optimized* image assets from new primary media library location at `assets/images/`
- new behavior: load image from page dir falling back to media library at `assets/images/` and then to remote URI.
- multi-res support. leading to increased perf.
- custom ID for cross-refs
- efficient, vanilla (non-jQuery), MIT licensed image zooming
- FancyBox now only loaded for Gallery shortcode
- themeable SVG support
- native lazy loading
Experimental, may change.
BREAKING CHANGE:
Move any figure images (i.e. not the `sharing.*` image) from `static/media/` to `assets/images/`
See #2164
Firefox console notice: Cookie “_ga” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute.
Use provider names rather than integers.
BREAKING CHANGE:
- Rename `site.Params.comments.engine` to `site.Params.comments.provider`
- Rename `site.Params.search.engine` to `site.Params.search.provider`
- Rename `site.Params.map.engine` to `site.Params.map.provider`
- Use provider name (string) rather than integer
- For built-in search, provider is "wowchemy"
- For leaflet maps, the provider is "mapnik" or "mapbox"
Also:
- refactor Bootstrap JS out of wowchemy.js for easier maintenance
- refactor lengthy env checks to hugo.IsProduction
- refactor window.PlotlyConfig from inline JS to the init script
- no longer prevent loading GA if GTM provided, in case user wants both