Closed HassanAkbar closed 1 year ago
@HassanAkbar however we don’t have semantic search in all deployed geolexica sites, it is only deployed in the TC 211 one. Can we tailor it only for TC 211?
Or better yet, allow the gem to discover if it exists before creating the links?
In fact, it is best to integrate the semantic search build functionality within the Geolexica deployment itself just with Ruby, not requiring a Makefile.
@ronaldtse Currently, this is the code that we are using to add nav_items
on a page written here. As you can see that we are only showing those links which are in the config file (i.e in the site.nav.items
) so this will not show semantic-search
link for other geolexica sites that do not have semantic-search
present in the config file.
{%- assign nav_items = page.nav_items | default: layout.nav_items %}
{%- if nav_items %}
<nav class="priority-nav">
<ul>
{%- for item in site.nav.items %}
{%- if nav_items contains item.id %}
<li>
<a href="{{ item.url }}">{{ item.title }}</a>
</li>
{%- endif %}
{%- endfor %}
</ul>
</nav>
{%- endif %}
Excellent, thanks! Please merge when ready.
Adding semantic search links on all pages