Move default media library from static/img/ to static/media/ as it can now contain audio, video, and other kinds of media in addition to images.
BREAKING CHANGE:
Either rename your site's static/img/ to static/media/ (and update any references to this folder in your Markdown files);
Or, add `media_dir = "img"` to `params.toml` to continue using the legacy location.
Similar to the Docs layout but much easier to use.
Add `type: book` to a page's front matter and place Markdown files within a folder hierarchy to automatically create the book sidebar navigation.
Introduces {{< list_children >}} shortcode for listing children of a book chapter.
`class="lazyload"` was earlier removed but the `data-src` was not reverted to `src`.
Fixes gallery images not loading from `static/img/` or from remote URL.
Fix#1771
Generates linkable IDs for figures by anchorizing the caption and namespacing the figure ID by prefixing it with `figure-` to help prevent conflicts with other existing IDs.
As of a recent update, gallery and figure images are lazy loaded. However, lazy loading without initial sizes defined can lead to inaccurate anchor scrolling and active link highlighting as the anchor offset changes after an uncached image occurring before the anchor is lazily loaded.
See https://github.com/gcushen/hugo-academic/issues/1199#issuecomment-577293818Fix#1199
The proportion of image data in the typical payload of a website can be significant. Lazy loading is a solution that lowers initial page payload and load time, without removing content. Non-critical resources are instead loaded at the moment that they are needed.
Also, load MathJax async in head if required, rather than at end of body.
Close#1106
Attempt to use anchorize rather than urlize for fetching user profiles for users with non-ASCII usernames. Apparently `anchorize` does not perform URL encoding unlike `urlize`, so may be better suited for use with `GetPage`.
See https://github.com/gohugoio/hugo/issues/5687
To mention someone, type `{{% mention "username" %}}` where `username` corresponds to a user account in Academic. This will create a link to the user's profile page.
Close#1421
Fixes image captions when the Gallery shortcode is used on Widget Pages.
The issue was caused by a path mismatch in the code.
Adds support for using Markdown and emojis in image gallery captions.
Close#1136 - the bug report.
To use, add `diagram: true` to a page's YAML front matter and create a
diagram from text in the body of the Markdown file using Mermaid syntax:
https://mermaidjs.github.ioClose#1111
Prior to this update, Hugo began displaying urlized tags like
`deep-learning` rather than `Deep Learning` in the Tag Cloud widget and
the list_tags/categories shortcodes.
Fix#1072
To use:
1. Create a gallery album folder in page bundle
2. Add images to album folder
3. Paste `{{< gallery album="<ALBUM FOLDER>" >}}` in your page content
Close#786
To reference file in page folder, simply use
`{{< figure src="a.png" >}}`
To reference file from `static/img/` media library, set `library=1`
in shortcode. E.g. `{{< figure src="a.png" library=1 >}}`
See #708
- Figures are now unnumbered by default
- To number a figure, use the form:
- `{{< figure src="image.jpg" title="Caption" numbered="true" >}}`
- Add i18n translation for "Figure" in captions
- Update English and Chinese language packs
Close#328 and #513