Global site parameters
On top of Hugo global configuration, the Relearn theme lets you define the following parameters in your
config.toml (here, values are default).
Note that some of these parameters are explained in details in other sections of this documentation.
A word on running your site in a subfolder
The theme runs best if your site is installed in the root of your webserver. If your site is served from a subfolder, eg.
https://example.com/mysite/, you have to set the following lines to your
baseURL = "https://example.com/mysite/" canonifyURLs = true
canonifyURLs=true URLs in sublemental pages (like
rss.xml) will be generated falsly while your HTML files will still work. See https://github.com/gohugoio/hugo/issues/5226.
If not already present, add the follow lines in the same
[outputs] home = ["HTML", "RSS", "JSON"]
Hugo generate lunrjs index.json at the root of public folder. When you build the site with
hugo server, hugo generates it internally and of course it doesn’t show up in the filesystem
Activate print support
You can activate print support to add the capability to print whole chapters or even the complete site. Just add the
config.toml as seen below:
[outputs] home = ["HTML", "RSS", "PRINT", "JSON"] section = ["HTML", "RSS", "PRINT"] page = ["HTML", "RSS", "PRINT"]
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.
While colors of your chosen color variant are reset to the theme’s light standard values for printing, this does not apply for Mermaid diagrams and Swagger/OpenAPI Specification. Those will still use the colors of your chosen color variant which may cause a non coherent look on paper.
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 for additional documentation.
MathJax is globally disabled. By default it won’t be loaded by any page.
You also can disable MathJax for specific pages while globally enabled.
The Mermaid configuration parameters can also be set on a specific page. In this case, the global parameter would be overwritten by the local one. See Mermaid for additional documentation.
Mermaid is globally disabled. By default it won’t be loaded by any page.
You also can disable Mermaid for specific pages while globally enabled.
Home Button Configuration
disableLandingPageButton option is set to
false, a Home button will appear
on the left menu. It is an alternative for clicking on the logo. To edit the
appearance, you will have to configure two parameters for the defined languages:
[Languages] [Languages.en] ... landingPageName = "<i class='fas fa-home'></i> Home" ... [Languages.pir] ... landingPageName = "<i class='fas fa-home'></i> Arrr! Homme" ...
If those params are not configured for a specific language, they will get their default values:
landingPageName = "<i class='fas fa-home'></i> Home"
The home button is going to look like this: