<p>This document shows you what’s new in the latest release. For a detailed list of changes, see the <ahref="/hugo-theme-relearn/basics/history/">history page</a>.</p>
<li><strong>Change</strong>: If you’ve set <code>collapsibleMenu = true</code> in your <code>config.toml</code>, the menu will be expanded if a search term is found in a collapsed submenu. The menu will return to its initial collapse state once the search term does not match any submenus.</li>
<p><strong>Change</strong>: Because the print preview URLs were non deterministic for normal pages in comparison to page bundles, this is now changed. Each print preview is now accessible by adding a <code>index.print.html</code> to the default URL.</p>
<p>You can revert this behavior by overwriting the PRINT output format setting in your <code>config.toml</code>to:</p>
<p><strong>Breaking</strong>: The theme changed how JavaScript and CSS dependencies are loaded to provide a better performance. In case you’ve added own JavaScript code that depends on the themes jQuery implementation, you have to put it into a separate <code>*.js</code> file (if not already) and add the <code>defer</code> keyword to the <code>script</code> element. Eg.</p>
<p><strong>Change</strong>: The way <ahref="/hugo-theme-relearn/cont/archetypes/">archetypes</a> are used to generate output has changed. The new systems allows you, to redefine existing archetypes or even generate your own ones.</p>
<p>Your existing markdown files will still work like before and therefore you don’t need to change anything after the upgrade. Nevertheless, it is recommended to adapt your existing markdown files to the new way as follows:</p>
<p>for your home page, add the frontmatter parameter <code>archetype = "home"</code> and remove the leading heading</p>
</li>
<li>
<p>for all files containing the deprecated frontmatter parameter <code>chapter = true</code>, replace it with <code>archetype = "chapter"</code> and remove the leading headings</p>
</li>
</ul>
</li>
<li>
<p><strong>Change</strong>: The frontmatter options <code>pre</code> / <code>post</code> were renamed to <code>menuPre</code> / <code>menuPost</code>. The old options will still be used if the new options aren’t set. Therefore you don’t need to change anything after the upgrade.</p>
<p><strong>New</strong>: Adding new partials <code>heading-pre.html</code> / <code>heading-post.html</code> and according frontmatter options <code>headingPre</code> / <code>headingPost</code> to modifiy the way your page`s main heading gets styled.</p>
</li>
<li>
<p><strong>New</strong>: The new shortcode <code>math</code> is available to add beautiful math and chemical formulae. See the <ahref="/hugo-theme-relearn/shortcodes/math/">documentation</a> for available features. This feature will not work with Internet Explorer 11.</p>
<p><strong>Breaking</strong>: The second parameter for the <ahref="/hugo-theme-relearn/shortcodes/tabs/"><code>include</code> shortcode</a> was switched in meaning and was renamed from <code>showfirstheading</code> to <code>hidefirstheading</code>. If you haven’t used this parameter in your shortcode, the default behavior hasn’t changed and you don’t need to change anything.</p>
<p>If you’ve used the second boolean parameter, you have to rename it and invert its value to achive the same behavior.</p>
<p><strong>Change</strong>: Previously, if the <ahref="/hugo-theme-relearn/shortcodes/tabs/"><code>tabs</code> shortcode</a> could not find a tab item because, the tabs ended up empty. Now the first tab is selected instead.</p>
<p><strong>Change</strong>: The <code>landingPageURL</code> was removed from <code>config.toml</code>. You can savely remove this aswell from your configuration as it is not used anymore. The theme will detect the landing page URL automatically.</p>
<p><strong>New</strong>: All shortcodes can now be also called from your partials. Examples for this are added to the documentation of each shortcode.</p>
<li><strong>New</strong>: While fixing issues with the search functionality for non latin languages, you can now <ahref="/hugo-theme-relearn/cont/i18n/#search-with-mixed-language-support">configure to have multiple languages on a single page</a>.</li>
<p><strong>Breaking</strong>: The <code>custom_css</code> config parameter was removed from the configuration. If used in an existing installation, it can be achieved by overriding the <code>custom-header.html</code> template in a much more generic manner.</p>
<p><strong>Breaking</strong>: Because anchor hover color was not configurable without introducing more complexitity to the variant stylesheets, we decided to remove <code>--MAIN-ANCHOR-color</code> instead. You don’t need to change anything in your custom color stylesheet as the anchors now get their colors from <code>--MAIN-LINK-color</code> and <code>--MAIN-ANCHOR-HOVER-color</code> respectivley.</p>
<p><strong>New</strong>: All shortcodes now support named parameter. The positional parameter are still supported but will not be enhanced with new features, so you don’t need to change anything in your installation.</p>
<p>This applies to <ahref="/hugo-theme-relearn/shortcodes/expand/"><code>expand</code></a>, <ahref="/hugo-theme-relearn/shortcodes/include/"><code>include</code></a>, <ahref="/hugo-theme-relearn/shortcodes/notice/"><code>notice</code></a> and <ahref="/hugo-theme-relearn/shortcodes/siteparam/"><code>siteparam</code></a>.</p>
<p><strong>New</strong>: The <ahref="/hugo-theme-relearn/shortcodes/button/"><code>button</code></a> shortcode received some love and now has a parameter for the color style similar to other shortcodes.</p>
</li>
<li>
<p><strong>New</strong>: New colors <code>--PRIMARY-color</code> and <code>--SECONDARY-color</code> were added to provide easier modification of your custom style. Shortcodes with a color style can now have <code>primary</code> or <code>secondary</code> as additional values.</p>
<p>These two colors are the default for other, more specific color variables. You don’t need to change anything in your existing custom color stylesheets as those variables get reasonable default values.</p>
<p><strong>Breaking</strong>: If you had previously overwritten the <code>custom-footer.html</code> partial to add visual elements below the content of your page, you have to move this content to the new partial <code>content-footer.html</code>. <code>custom-footer.html</code> was never meant to contain HTML other than additional styles and JavaScript.</p>
<p><strong>New</strong>: If you prefer expandable/collapsible menu items, you can now set <code>collapsibleMenu=true</code> in your <code>config.toml</code>. This will add arrows to all menu items that contain sub menus. The menu will expand/collapse without navigation if you click on an arrow.</p>
<p><strong>New</strong>: You can activate <ahref="/hugo-theme-relearn/basics/configuration/#activate-print-support">print support</a> in your <code>config.toml</code> to add the capability to print whole chapters or even the complete site.</p>
<p><strong>New</strong>: Introduction of new CSS variables to set the font. The theme distinguishs between <code>--MAIN-font</code> for all content text and <code>--CODE-font</code> for inline or block code. There are additional overrides for all headings. See the <ahref="/hugo-theme-relearn/basics/generator/">theme variant generator</a> of the exampleSite for all available variables.</p>
<p><strong>New</strong>: The new shortcode <code>swagger</code> is available to include a UI for REST OpenAPI Specifications. See the <ahref="/hugo-theme-relearn/shortcodes/swagger/">documentation</a> for available features. This feature will not work with Internet Explorer 11.</p>
<p><strong>Change</strong>: In this release the Mermaid JavaScript library will only be loaded on demand if the page contains a Mermaid shortcode or is using Mermaid codefences. This changes the behavior of <code>disableMermaid</code> config option as follows: If a Mermaid shortcode or codefence is found, the option will be ignored and Mermaid will be loaded regardlessly.</p>
<p>The option is still useful in case you are using scripting to set up your graph. In this case no shortcode or codefence is involved and the library is not loaded by default. In this case you can set <code>disableMermaid=false</code> in your frontmatter to force the library to be loaded. See the <ahref="/hugo-theme-relearn/basics/generator/">theme variant generator</a> of the exampleSite for an example.</p>
<p><strong>This change requires at least Hugo 0.93.0 to be used</strong>. The minimum requirement will be reported during build on the console if not met.</p>
<p><strong>New</strong>: Additional color variant variable <code>--MERMAID-theme</code> to set the variant’s Mermaid theme. This causes the Mermaid theme to switch with the color variant if it defers from the setting of the formerly selected color variant.</p>
<li><strong>New</strong>: <ahref="/hugo-theme-relearn/shortcodes/attachments/"><code>attachment</code></a> and <ahref="/hugo-theme-relearn/shortcodes/notice/"><code>notice</code></a> shortcodes have a new parameter to override the default icon. Allowed values are all <ahref="https://fontawesome.com/v5/search?m=free">Font Awesome 5 Free</a> icons.</li>
<p><strong>Breaking</strong>: We made changes to the menu footer. If you have your <code>menu-footer.html</code><ahref="/hugo-theme-relearn/basics/customization/">partial overridden</a>, you may have to review the styling (eg. margins/paddings) in your partial. For a reference take a look into the <code>menu-footer.html</code> partial that is coming with the exampleSite.</p>
<p>This change was made to allow your own menu footer to be placed right after the so called prefooter that comes with the theme (containing the language switch and <em>Clear history</em> functionality).</p>
<p><strong>Breaking</strong>: We have changed the default colors from the original Learn theme (the purple menu header) to the Relearn defaults (the light green menu header) as used in the official documentation.</p>
<p>This change will only affect your installation if you’ve not set the <code>themeVariant</code> parameter in your <code>config.toml</code>. <ahref="/hugo-theme-relearn/basics/customization/#theme-variant">If you still want to use the Learn color variant</a>, you have to explicitly set <code>themeVariant="learn"</code> in your <code>config.toml</code>.</p>
<p>Note, that this will also affect your site if viewed with Internet Explorer 11 but in this case it can not be reconfigured as Internet Explorer does not support CSS variables.</p>
<p><strong>Change</strong>: Due to a bug, that we couldn’t fix in a general manner for color variants, we decided to remove <code>--MENU-SEARCH-BOX-ICONS-color</code> and introduced <code>--MENU-SEARCH-color</code> instead. You don’t need to change anything in your custom color stylesheet as the old name will be used as a fallback.</p>
<p><strong>Change</strong>: For consistency reasons, we renamed <code>--MENU-SEARCH-BOX-color</code> to <code>--MENU-SEARCH-BORDER-color</code>. You don’t need to change anything in your custom color stylesheet as the old name will be used as a fallback.</p>
<p>To make this possible, we have introduced a lot more color variables you can use in <ahref="/hugo-theme-relearn/basics/customization/#theme-variant">your color variants</a>. Your old variants will still work and don’t need to be changed as apropriate fallback values are used by the theme. Nevertheless, the new colors allow for much more customization.</p>
<p><strong>New</strong>: To make the creation of new variants easier for you, we’ve added a new interactive <ahref="/hugo-theme-relearn/basics/generator/">theme variant generator</a>. This feature will not work with Internet Explorer 11.</p>
<p><strong>New</strong>: You can now configure multiple color variants in your <code>config.toml</code>. In this case, the first variant is the default chosen on first view and a variant switch will be shown in the menu footer. See the <ahref="/hugo-theme-relearn/basics/customization/#multiple-variants">documentation</a> for configuration.</p>
<p>Note, that the new variant switch will not work with Internet Explorer 11 as it does not support CSS variables. Therefore, the variant switcher will not be displayed with Internet Explorer 11.</p>
<p><strong>Breaking</strong>: This release removes the themes implementation of <code>ref</code>/<code>relref</code> in favor for Hugos standard implementation. This is because of inconsistencies with the themes implementation. In advantage, your project becomes standard complient and exchanging this theme in your project to some other theme will be effortless.</p>
<p>In a standard complient form you must not link to the <code>*.md</code> file but to its logical name. You’ll see, referencing other pages becomes much easier. All three types result in the same reference:</p>
<p>If you’ve linked from a page of one language to a page of another language, conversion is a bit more difficult but <ahref="https://gohugo.io/content-management/cross-references/#link-to-another-language-version">Hugo got you covered</a> as well.</p>
<p>Also, the old themes implementation allowed refs to non-existing content. This will cause Hugos implementation to show the error below and abort the generation. If your project relies on this old behavior, you can <ahref="https://gohugo.io/content-management/cross-references/#link-to-another-language-version">reconfigure the error handling</a> of Hugos implementation.</p>
<p>In the best case your usage of the old implementation is already standard complient and you don’t need to change anything. You’ll notice this very easily once you’ve started <code>hugo server</code> after an upgrade and no errors are written to the console.</p>
<p>You may see errors on the console after the update in the form:</p>
<p>Copy the old implementation files <code>theme/hugo-theme-relearn/layouts/shortcode/ref.html</code> and <code>theme/hugo-theme-relearn/layouts/shortcode/relref.html</code> to your own projects <code>layouts/shortcode/ref.html</code> and <code>layouts/shortcode/relref.html</code> respectively. <strong>This is not recommended</strong> as your project will still rely on non-standard behavior afterwards.</p>
</li>
<li>
<p>Start up a text editor with regular expression support for search and replace. Apply the following conversions in the given order on all <code>*.md</code> files. <strong>This is the recommended choice</strong>.</p>
<p><strong>Change</strong>: Although never officially documented, this release removes the font <code>Novacento</code>/<code>Novecento</code>. If you use it in an overwritten CSS please replace it with <code>Work Sans</code>. This change was necessary as Novacento did not provide all Latin special characters and lead to mixed styled character text eg. for czech.</p>
<p><strong>New</strong>: The theme now supports favicons served from <code>static/images/</code> named as <code>favicon</code> or <code>logo</code> in SVG, PNG or ICO format <ahref="/hugo-theme-relearn/basics/customization/#change-the-favicon">out of the box</a>. An overridden partial <code>layouts/partials/favicon.html</code> may not be necessary anymore in most cases.</p>
<p><strong>New</strong>: You can hide the table of contents menu for the whole site by setting the <code>disableToc</code> option in your <code>config.toml</code>. For an example see <ahref="/hugo-theme-relearn/basics/configuration/#global-site-parameters">the example configuration</a>.</p>
<li><strong>New</strong>: Optional second parameter for <ahref="/hugo-theme-relearn/shortcodes/notice/"><code>notice</code></a> shortcode to set title in box header.</li>
<li><strong>New</strong>: Your site can now be served from a subfolder if you set <code>baseURL</code> and <code>canonifyURLs=true</code> in your <code>config.toml</code>. See the <ahref="/hugo-theme-relearn/basics/configuration/#a-word-on-running-your-site-in-a-subfolder">documentation</a> for a detailed example.</li>
<li><strong>Change</strong>: New colors <code>--CODE-BLOCK-color</code> and <code>--CODE-BLOCK-BG-color</code> were added to provide a fallback for Hugos syntax highlightning in case <code>guessSyntax=true</code> is set. Ideally the colors are set to the same values as the ones from your chosen chroma style.</li>
<p><strong>Change</strong>: Creation of customized stylesheets was simplified down to only contain the CSS variables. Everything else can and should be deleted from your custom stylesheet to assure everything works fine. For the predefined stylesheet variants, this change is already included.</p>
<p><strong>New</strong>: Hidden pages are displayed by default in their according tags page. You can now turn off this behavior by setting <code>disableTagHiddenPages=true</code> in your <code>config.toml</code>.</p>
<p><strong>New</strong>: You can define the expansion state of your menus for the whole site by setting the <code>alwaysopen</code> option in your <code>config.toml</code>. Please see further <ahref="/hugo-theme-relearn/cont/pages/#override-expand-state-rules-for-menu-entries">documentation</a> for possible values and default behavior.</p>
<p><strong>New</strong>: New frontmatter <code>ordersectionsby</code> option to change immediate children sorting in menu and <code>children</code> shortcode. Possible values are <code>title</code> or <code>weight</code>.</p>
<p><strong>New</strong>: Alternate content of a page is now advertised in the HTML meta tags. See <ahref="https://gohugo.io/templates/rss/#reference-your-rss-feed-in-head">Hugo documentation</a>.</p>
<li><strong>New</strong>: Showcase multilanguage features by provding a documentation translation “fer us pirrrates”. There will be no other translations besides the original English one and the Pirates one due to maintenance constraints.</li>
<li><strong>New</strong>: Hidden pages are displayed by default in the sitemap generated by Hugo and are therefore visible for search engine indexing. You can now turn off this behavior by setting <code>disableSeoHiddenPages=true</code> in your <code>config.toml</code>.</li>
<p><strong>Change</strong>: In case the site’s structure contains addional *.md files not part of the site (eg files that are meant to be included by site pages - see <code>CHANGELOG.md</code> in the exampleSite), they will now be ignored by the search.</p>
<p><strong>New</strong>: Hidden pages are indexed for the site search by default. You can now turn off this behavior by setting <code>disableSearchHiddenPages=true</code> in your <code>config.toml</code>.</p>
</li>
<li>
<p><strong>New</strong>: If a search term is found in an <code>expand</code> shortcode, the expand will be opened.</p>
</li>
<li>
<p><strong>New</strong>: The menu will scroll the active item into view on load.</p>
<p><strong>Change</strong>: Syntaxhighlightning was switched to the <ahref="https://gohugo.io/content-management/syntax-highlighting/">built in Hugo mechanism</a>. You may need to configure a new stylesheet or decide to roll you own as described on in the Hugo documentation</p>
<p><strong>Change</strong>: In the predefined stylesheets there was a typo and <code>--MENU-HOME-LINK-HOVERED-color</code> must be changed to <code>--MENU-HOME-LINK-HOVER-color</code>. You don’t need to change anything in your custom color stylesheet as the old name will be used as a fallback.</p>
<p><strong>Change</strong>: <code>--MENU-HOME-LINK-color</code> and <code>--MENU-HOME-LINK-HOVER-color</code> were missing in the documentation. You should add them to your custom stylesheets if you want to override the defaults.</p>
<p><strong>Change</strong>: Arrow navigation and <code>children</code> shortcode were ignoring setting for <code>ordersectionsby</code>. This is now changed and may result in different sorting order of your sub pages.</p>
</li>
<li>
<p><strong>Change</strong>: If hidden pages are accessed directly by typing their URL, they will be exposed in the menu.</p>
</li>
<li>
<p><strong>Change</strong>: A page without a <code>title</code> will be treated as <code>hidden=true</code>.</p>
<p><strong>New</strong>: You can define the expansion state of your menus in the frontmatter. Please see further <ahref="/hugo-theme-relearn/cont/pages/#override-expand-state-rules-for-menu-entries">documentation</a> for possible values and default behavior.</p>
<p><strong>New</strong>: New partials for defining pre/post content for menu items and the content. See <ahref="/hugo-theme-relearn/basics/customization/">documentation</a> for further reading.</p>
<p><strong>New</strong>: Shortcode <ahref="/hugo-theme-relearn/shortcodes/children/"><code>children</code></a> with new parameter <code>containerstyle</code>.</p>
<p><strong>New</strong>: New shortcode <ahref="/hugo-theme-relearn/shortcodes/include/"><code>include</code></a> to include arbitrary file content into a page.</p>
<li><strong>New</strong>: Shortcode <ahref="/hugo-theme-relearn/shortcodes/expand/"><code>expand</code></a> with new parameter to open on page load.</li>
<li><strong>New</strong>: <ahref="/hugo-theme-relearn/shortcodes/mermaid/#configuration"><code>Mermaid</code></a> config options can be set in <code>config.toml</code>.</li>
<li><strong>New</strong>: Initial fork of the <ahref="https://github.com/matcornic/hugo-theme-learn">Learn theme</a> based on Learn 2.5.0 on 2021-07-01. This introduces no new features besides a global rename to <code>Relearn</code> and a new logo. For the reasons behind forking the Learn theme, see <ahref="https://github.com/matcornic/hugo-theme-learn/issues/442#issuecomment-907863495">this comment</a> in the Learn issues.</li>
<lidata-nav-id="/hugo-theme-relearn/cont/menushortcuts/"title="Menu extra shortcuts"class="dd-item"><ahref="/hugo-theme-relearn/cont/menushortcuts/">Menu extra shortcuts<iclass="fas fa-check read-icon"></i></a></li>
<lidata-nav-id="/hugo-theme-relearn/cont/icons/"title="Icons and logos"class="dd-item"><ahref="/hugo-theme-relearn/cont/icons/">Icons and logos<iclass="fas fa-check read-icon"></i></a></li>
<lidata-nav-id="/hugo-theme-relearn/cont/i18n/"title="Multilingual and i18n"class="dd-item"><ahref="/hugo-theme-relearn/cont/i18n/">Multilingual and i18n<iclass="fas fa-check read-icon"></i></a></li>
<aclass="github-button"href="https://github.com/McShelby/hugo-theme-relearn/archive/main.zip"data-icon="octicon-cloud-download"aria-label="Download McShelby/hugo-theme-relearn on GitHub">Download</a>
<aclass="github-button"href="https://github.com/McShelby/hugo-theme-relearn"data-icon="octicon-star"data-show-count="true"aria-label="Star McShelby/hugo-theme-relearn on GitHub">Star</a>
<aclass="github-button"href="https://github.com/McShelby/hugo-theme-relearn/fork"data-icon="octicon-repo-forked"data-show-count="true"aria-label="Fork McShelby/hugo-theme-relearn on GitHub">Fork</a>
<p>Built with <ahref="https://github.com/McShelby/hugo-theme-relearn"><iclass="fas fa-heart"></i></a> by <ahref="https://gohugo.io/">Hugo</a></p>