resources.PostProcess delays processing of a resource until the rest of the build has finished.
This allows the public folder or Hugo's hugo_stats.json file to be used as the content for PurgeCSS, so that only CSS that is used on the final website will be included.
Close#2318
Add gallery `order` with options "asc" or "desc"
Add gallery `resize_options` which supports Hugo image processing options.
BREAKING CHANGE:
Move gallery album folders to `assets/media/albums/`. Album name should be defined in shortcode as `album`.
Fix#2245
Prevent Hugo ordering weighted pages higher in the "latest" content list.
Also include course/docs index pages (Hugo "sections") and remove private pages (although Hugo render option is preferred equiv to "private:true")
To use, add SVG brand logo in lowercase to your `assets/media/icons/brands/` folder
BREAKING CHANGE:
Rename `assets/media/icon-pack/` to `assets/media/icons/`
Close#2259Close#1781
Language name doesn't appear when LanguageCode has a sub-code
The issue appears to be an inconsistency/bug with Hugo's `.Translations` lowercasing zh-Hant to zh-hant without offering a way to get the language code as it was defined.
We can workaround it for now by converting to lowercase to align with Hugo's current implementation.
Fix#2256
Refactor:
- business JSON-LD
- site_head
- Slider
- Gallery
- Video
Gallery is now intended only for local images in the page bundle (so that they can be optimized by Hugo).
Close#2119
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
Adds some default security headers.
CSP is configurable via Params.security.csp.policy (string) and Params.security.csp.report_only (boolean).
To enable, add `headers` to config.toml > outputs > home
Dedicated Netlify redirects file can also now be generated from front matter `aliases` by adding `redirects` to config.toml > outputs > home, and `disableAliases = true` to config.toml.
For example, if a blog post has an attachment, it will now be linked in the listing as well as in its page header.
May also reduce excess spacing by preventing empty attachment DIV in the case of no attachments/buttons since it now checks if a page has buttons.
For example, if a blog post has an attachment, it will now be linked in the listing as well as in its page header.
May also reduce excess spacing by preventing empty attachment DIV in the case of no attachments/buttons since it now checks if a page has buttons.
Example: `courses/learn-x/` will have a new item added to the book menu to link back to `courses/` whereas a site with just a first-level book e.g. `docs/` won't see any change to the menu.