0.21.02020-05-30
<h2 id="improvements"><a href="#improvements" id="improvements" class="anchor"></a>Improvements</h2>
<ul>
<li>Experimental sourcedocs are now enabled by default</li>
<li>Adds <code>collectionPages</code> menu item, which matches the same lookup behavior as the findAll() function. See
<a href="/wiki/user-manual/core-concepts/menus#collection-pages-menu-item">Menus</a> for usage.</li>
<li>Use <code>0.5</code> as default sitemap entry priority and always add priority to sitemap entries</li>
<li>Updates Kodiak version to 0.5.0, with several bugfixes for Dokka output, and preparation for generation of class
hierarchy diagrams (still WIP)</li>
<li>Sourcedocs modules can now link to one another. Projects such as multi-module Java libraries or Kotlin multiplatform
projects can now associate Orchid's documentation modules to one another, cross-linking to base classes or packages.
See docs <a href="/plugins/orchidkotlindoc#configuration-1">here</a></li>
<li>Deprecation messages are now only shown in diagnose mode. A warning notifying of detected deprecation usage or
diagnosed problems is now shown on normal builds.</li>
<li>Major improvements to asset management, external asset downloading, and asset inlining
<ul>
<li>Extra CSS/JS can now be configured as objects, and options like <code>download</code> and <code>inline</code> are available in extra CSS</li>
<li>A regression causing external assets to not download has been fixed</li>
<li>See docs <a href="/wiki/user-manual/core-concepts/assets#configuring-additional-assets">here</a></li>
</ul>
</li>
<li>New config DSL for setting up the <code>config.yml</code> in integration tests, and dramatically improved diagnostics for page
html assertion failures</li>
</ul>
<h2 id="bug-fixes"><a href="#bug-fixes" id="bug-fixes" class="anchor"></a>Bug Fixes</h2>
<ul>
<li>Fixes bugs with <code>orchidSearch</code> component
<ul>
<li>homepage is now included in search results</li>
<li>SourceDocs element names and comments are now included in search results</li>
</ul>
</li>
<li>Improves diagnostic output of OrchidTest APIs</li>
<li>Support various different lettercasing for homepage file</li>
<li>Fixes several cosmetic issues with Copper theme</li>
<li>Fixes issue of <code>-SNAPSHOT</code> being included in the Orchid version logs</li>
<li>Formatting issues with Kotlindocs have been fixed</li>
</ul>
<h2 id="breaking-changes"><a href="#breaking-changes" id="breaking-changes" class="anchor"></a>Breaking Changes</h2>
<p>This release includes 1 major breaking change to end-users, and the deprecation of several other end-user features which
will be removed in a future release:</p>
<ul>
<li>The <code>--experimentalSourceDoc</code> is no longer needed, as experiemental SourceDocs are now the default functionality. If
you are still using the legacy sourcedocs, you can still use them for a short time longer, but you must now add the
<code>--legacySourceDoc</code> flag to Orchid. Sites still building docs on legacy SourceDocs will not work without that flag,
but you must now migrate to the new SourceDocs. Legacy sourcedocs will be removed entirely in the next major
release.</li>
<li><code>{% styles %}</code> is now included within the <code>{% head %}</code> template tag. The <code>{% styles %}</code> tag now does nothing, and in
the next major version will be removed, causing template errors.</li>
<li><code>{% scripts %}</code> has been replaced by the <code>{% body %}</code> and <code>{% endbody %}</code> template tags. <code>{% scripts %}</code> will be
removed in the next major version, causing template errors.</li>
</ul>
<p>In additional, there are several changes to both internal and public code APIs. The following are only of importance to
developers making custom Orchid plugins, but can be ignored by anyone else as they do not impact end-user functionality.</p>
<ul>
<li>The signature for <code>fun loadAssets()</code> in themes, pages, and components has been changed to
<code>loadAssets(delegate: AssetManagerDelegate)</code>.
<ul>
<li>In <code>loadAssets</code>, calls to <code>addCss</code> and <code>addJs</code> should now be made on that delegate: <code>delegate.addCss("...")</code>,
<code>delegate.addJs("...")</code>. You can also use <code>with(delegate) { ... }</code> in Kotlin to reduce the boilerplate.</li>
<li>Previously, custom code needed to be written to prevent some external assets from being downloaded, but now the
<code>addCss</code> and <code>addJs</code> methods accept a configuration lambda or object with these available options. They are the
same options available to <code>extraCss</code> and <code>extraJs</code>, so there is now difference between assets loaded in
<code>loadAssets()</code> or attached from the extra assets.</li>
</ul>
</li>
<li>OrchidTest methods for directly selecting and testing HTML have been removed. Instead, you should use the
<code>htmlHeadMatches</code> and <code>htmlBodyMatches</code> methods to build DOM subtrees. However, diagnostic output is greatly
improved for these matchers.</li>
<li>Meta-components can now render content to the page head, or the start or end of the HTML body. This is currently only
reserved for future use with official Orchid plugins, but may be of interest to develoers making custom plugins in
the Orchid community.</li>
<li>Methods from <code>ResourceService</code> for locating assets has been significantly improved. Rather than calling methods like
<code>getResourceEntry()</code> and <code>locateLocalResource()</code> on the <code>context</code>, they have now been moved into dedicated
<code>OrchidResourceSources</code> which can be gotten through the context. The <code>ResourceService</code> now only has methods to get
the following types of resource sources:
<ul>
<li><code>getDefaultResourceSource()</code> - Replaces <code>getResourceEntry()</code> and <code>getResourceEntries()</code>, which are now implemented
on this default resource source. This will delegate the actual resource lookup to the site resources, theme,
and registered plugins. They are also cached to improve lookup performance.</li>
<li><code>getFlexibleResourceSource()</code> - Wraps the default resource source to add more flexible resource-lookup logic to
it. Normal lookups must match both filename and extension, but flexible lookups will be abel to match by
filename only, selecting a resource of any file extension. Replaces call to <code>locateLocalResourceEntry()</code> and
<code>findClosestFile()</code>. Note that <code>findClosestFile()</code> is deprecated as it does not delegate to the default resource
source, and so should be avoided.</li>
<li><code>getTemplateResourceSource()</code> - Wraps the default resource source to add template-locating logic to it. Replaces
call to <code>locateTemplate()</code>.</li>
<li><code>getDataResourceSource()</code> - Wraps the default resource source to add functionality for loading data markup into
a <code>Map</code>. Replaces call to <code>getDatafile</code> and <code>getDatafiles()</code>.</li>
</ul>
</li>
</ul>