<metaname="description"content="2.9.0 (2021-11-19) Breaking Breaking This release removes the themes implementation of ref/relref in favor for Hugo’s standard implementation. This is because of inconsistencies with the themes implementation. In advantage, your project becomes standard compliant and exchanging this theme in your project to some other theme will be effortless.">
<metaname="twitter:title"content="Version 2.9 :: Hugo Relearn Theme">
<metaname="twitter:description"content="2.9.0 (2021-11-19) Breaking Breaking This release removes the themes implementation of ref/relref in favor for Hugo’s standard implementation. This is because of inconsistencies with the themes implementation. In advantage, your project becomes standard compliant and exchanging this theme in your project to some other theme will be effortless.">
<metaproperty="og:title"content="Version 2.9 :: Hugo Relearn Theme">
<metaproperty="og:description"content="2.9.0 (2021-11-19) Breaking Breaking This release removes the themes implementation of ref/relref in favor for Hugo’s standard implementation. This is because of inconsistencies with the themes implementation. In advantage, your project becomes standard compliant and exchanging this theme in your project to some other theme will be effortless.">
<metaitemprop="name"content="Version 2.9 :: Hugo Relearn Theme">
<metaitemprop="description"content="2.9.0 (2021-11-19) Breaking Breaking This release removes the themes implementation of ref/relref in favor for Hugo’s standard implementation. This is because of inconsistencies with the themes implementation. In advantage, your project becomes standard compliant and exchanging this theme in your project to some other theme will be effortless.">
<p><spanclass="badge cstyle note badge-with-title"><spanclass="badge-title"><iclass="fa-fw fas fa-exclamation-circle"></i></span><spanclass="badge-content">Change</span></span> Change of behavior, may require action</p>
</li>
<li>
<p><spanclass="badge cstyle info badge-with-title"><spanclass="badge-title"><iclass="fa-fw fas fa-plus-circle"></i></span><spanclass="badge-content">New</span></span> New behavior, often introducing new options</p>
</li>
</ul>
<hr>
<h2id="2-9-0">2.9.0 (2021-11-19)</h2>
<h3id="breaking">Breaking</h3>
<ul>
<li>
<p><spanclass="badge cstyle warning badge-with-title"><spanclass="badge-title"><iclass="fa-fw fas fa-exclamation-triangle"></i></span><spanclass="badge-content">Breaking</span></span> This release removes the themes implementation of <code>ref</code>/<code>relref</code> in favor for Hugo’s standard implementation. This is because of inconsistencies with the themes implementation. In advantage, your project becomes standard compliant and exchanging this theme in your project to some other theme will be effortless.</p>
<p>In a standard compliant 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"rel="external"target="_self">Hugo got you covered</a> as well.</p>
<p>Also, the old themes implementation allowed refs to non-existing content. This will cause Hugo’s 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"rel="external"target="_self">reconfigure the error handling</a> of Hugo’s implementation.</p>
<p>In the best case your usage of the old implementation is already standard compliant 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>In this case, you must apply one of two options:</p>
<ol>
<li>
<p>Start up a text editor with regular expression support for search and replace. Search for <code>(ref\s+"[^"]*?)(?:/_index|/index)?(?:\.md)?(#[^"]*?)?"</code> and replace it by <code>$1$2"</code> in all <code>*.md</code> files. <strong>This is the recommended choice</strong>.</p>
</li>
<li>
<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>