print: fix urls for uglyURLs=true #322

This commit is contained in:
Sören Weber 2022-08-23 21:09:20 +02:00
parent 21fd3624c3
commit 0fb76d2a37
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
2 changed files with 7 additions and 0 deletions

View file

@ -9,3 +9,4 @@
isHTML = true isHTML = true
mediaType = 'text/html' mediaType = 'text/html'
permalinkable = false permalinkable = false
noUgly = true

View file

@ -120,6 +120,12 @@ You can activate print support to add the capability to print whole chapters or
This will add a little printer icon in the top bar. It will switch the page to print preview when clicked. You can then send this page to the printer by using your browser's usual print functionality. This will add a little printer icon in the top bar. It will switch the page to print preview when clicked. You can then send this page to the printer by using your browser's usual print functionality.
{{% notice note %}}
The resulting URL will not be [configured ugly](https://gohugo.io/templates/output-formats/#configure-output-formats) in terms of [Hugo's URL handling](https://gohugo.io/content-management/urls/#ugly-urls) even if you've set `uglyURLs=true` in your `config.toml`. This is due to the fact that for one mime type only one suffix can be configured.
Nevertheless, if you're unhappy with the resulting URLs you can manually redefine `outputFormats.PRINT` in your own `config.toml` to your liking.
{{% /notice %}}
## MathJax ## MathJax
The MathJax configuration parameters can also be set on a specific page. In this case, the global parameter would be overwritten by the local one. See [Math]({{< relref "shortcodes/math" >}}) for additional documentation. The MathJax configuration parameters can also be set on a specific page. In this case, the global parameter would be overwritten by the local one. See [Math]({{< relref "shortcodes/math" >}}) for additional documentation.