This is an automated email from the ASF dual-hosted git repository. zregvart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-website.git
The following commit(s) were added to refs/heads/master by this push: new cec2066 fix: nav-explore not showing anything but current cec2066 is described below commit cec20661c6268bb370f21aacf36b6da55e4b3e5b Author: Zoran Regvart <zregv...@apache.org> AuthorDate: Mon Dec 21 11:16:31 2020 +0100 fix: nav-explore not showing anything but current A bug was introduced in fb75497471e8975238ed6114e3550e01f02c533f, in effort to remove the Camel Quarkus Examples from the nav-explore planel an JavaScript object was converted to an Array, and when rendered only the first item was considered. This fixes this issue by making sure that the structure of the data doesn't change, i.e. given an object it will output an object when filtering out data for the nav-explore panel. --- antora-ui-camel/src/helpers/exclude.js | 6 +----- antora-ui-camel/src/partials/nav-explore.hbs | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/antora-ui-camel/src/helpers/exclude.js b/antora-ui-camel/src/helpers/exclude.js index a16487c..8665466 100644 --- a/antora-ui-camel/src/helpers/exclude.js +++ b/antora-ui-camel/src/helpers/exclude.js @@ -1,7 +1,3 @@ 'use strict' -module.exports = (elements, del) => { - const ary = Object.entries(elements) - const idx = ary.indexOf(del) - return ary.splice(idx, 1) -} +module.exports = (elements, del) => Object.fromEntries(Object.entries(elements).filter(([k, v]) => v.name !== del)) diff --git a/antora-ui-camel/src/partials/nav-explore.hbs b/antora-ui-camel/src/partials/nav-explore.hbs index 19b9647..a801eff 100644 --- a/antora-ui-camel/src/partials/nav-explore.hbs +++ b/antora-ui-camel/src/partials/nav-explore.hbs @@ -6,7 +6,7 @@ </div> {{/if}} <ul class="components"> - {{#each (exclude (order_components site.components) 'Camel Quarkus examples')}} + {{#each (exclude (order_components site.components) 'camel-quarkus-examples')}} <li class="component{{#if (eq this @root.page.component)}} is-current{{/if}}"> <span class="title">{{{./title}}}</span> <ul class="versions">