Added a configuration option to disable medium zoom
* Added a configuration option for the medium zoom functionality.
| | |
| | | customJs = ["https://cdn.exmple.org/fancyscript.js", "js/world.js"] |
| | | ``` |
| | | |
| | | ### Medium Like Zoom |
| | | |
| | | Enabled by default, the medium like zoom for images can be disabled by adding the following config under `[params]`. |
| | | |
| | | ```toml |
| | | [params] |
| | | enableMediumZoom = false |
| | | ``` |
| | | |
| | | ### Content Security Policy |
| | | |
| | | The theme is compliant with most strict CSP policies out of the box. A sample CSP for an Anatole-based site would look something like this: |
| | |
| | | {{ $enableMediumZoom := default true (.Site.Params.enableMediumZoom) }} |
| | | {{- if eq $enableMediumZoom true -}} |
| | | {{ $js := resources.Get "js/medium-zoom.js" }} |
| | | {{ $secureJS := $js | resources.Minify | resources.Fingerprint }} |
| | | <script type="text/javascript" |
| | | src="{{ $secureJS.Permalink }}" |
| | | integrity="{{ $secureJS.Data.Integrity }}" |
| | | crossorigin="anonymous"></script> |
| | | {{- end -}} |