Since it only accepts one element, I cannot pass `.article-content` and `#TableOfContent` to it. The official documentation uses `document.body` directly, so I guess that's fine.
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/882
* feat(archives): add search bar to archives page
* fix: error `file is nil; wrap it in if or with` from Hugo 0.123.0
* style: rename `search.ts` to `archives.ts`
* refactor: remove `search` page layout
* doc: remove `search` from `exampleSite`
* fix: generate JSON output for archives page in exampleSite
* feat: put archives search form under categories list
* fix(partials): ensure params always exist
If the `params` key is not defined in the config file, accessing `params` results in a `nil pointer evaluating interface {}` error because `params` does not exist.
This can be fixed by ensuring that params is always a map.
* style(widgets): `default` no pipes required
* fix: title does not show pagination data
This is caused by partialCached. It turns out that the `.RelPermalink` is the same for all pages generated by the paginator, so they will show the same title as the first page.
closes https://github.com/CaiJimmy/hugo-theme-stack/issues/941
* doc(exampleSite): set paginate to 3 to force pagination
Add `allowedTypes` and `resizableTypes` to `imageProcessing` configuration
Prior to this commit, SVG images were not processed by `render-image.html` because SVG does not have a physical dimension like JPEG. This logic was done using a conditional.
I have now realised that Hugo can be very slow when resizing `gif` images. So I created this whitelist mechanism:
- `allowedTypes`: image types with width and height attributes
- `resizableTypes`: image types that can be resized
Here's a list of media types: bmp, gif, jpeg, png, svg+xml, tiff, webp
https://gohugo.io/templates/output-formats/#media-types
* Add link to navbar sections and refactor names
* Prevent duplicate tags and categories information
* Add style to the widget links
* refactor: add `taxonomy` widget
Replaces `categories` and `tag-cloud` widget.
* style: remove unused `font_size_{{ .Count }}` in `taxonomy` widget
---------
Co-authored-by: Jimmy Cai <hi@jimmycai.com>