<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://cecilapp.github.io/theme-flexsearch/xsl/atom.xsl" media="all"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://cecilapp.github.io/theme-flexsearch/</id>
  <title>FlexSearch</title>
  <subtitle><![CDATA[Demo of the FlexSearch component theme for Cecil.]]></subtitle>
  <link href="https://cecilapp.github.io/theme-flexsearch/atom.xml" rel="self" type="application/atom+xml" />
  <link href="https://cecilapp.github.io/theme-flexsearch/" rel="alternate" type="text/html" />
  <updated>2026-10-20T02:19:12+00:00</updated>
  <author>
    <name>FlexSearch</name>
    <uri>https://cecilapp.github.io/theme-flexsearch/</uri>
  </author>
  <entry xml:lang="en">
    <id>https://cecilapp.github.io/theme-flexsearch/docs/configuration/</id>
    <title>Configuration</title>
    <published>2026-10-20T02:19:06+00:00</published>
    <link href="https://cecilapp.github.io/theme-flexsearch/docs/configuration/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<h1>Configuration</h1>
<p>The search is configured in the <code translate="no">flexsearch</code> section of the website configuration.</p>
<h2 id="indexed-sections">Indexed sections</h2>
<p>The indexed sections are listed under <code translate="no">flexsearch.sections</code>, in the order of the result groups. By default, every root section of the website is indexed.</p>
<h3 id="limit">Limit</h3>
<p>The <code translate="no">limit</code> option sets the maximum number of results displayed in a group.</p>
<h3 id="split-pages">Split pages</h3>
<p>By default, each page is split into one record per <code translate="no">&lt;h2&gt;</code> and <code translate="no">&lt;h3&gt;</code> heading, linked to its anchor. Set <code translate="no">split: false</code> to index a single record per page, as for blog posts.</p>
<h3 id="date">Date</h3>
<p>Set <code translate="no">date: true</code> to display the date of the page in the results, instead of the breadcrumb.</p>
<h2 id="search-options">Search options</h2>
<p>The <code translate="no">tokenize</code> option sets how words are matched (<code translate="no">strict</code>, <code translate="no">forward</code>, <code translate="no">reverse</code> or <code translate="no">full</code>), and <code translate="no">encoder</code> sets how characters are normalized, for example to ignore accents.</p>
<h3 id="fields-weight">Fields weight</h3>
<p>Each indexed field (title, page, description and content) has a resolution, from 1 to 9: the higher, the more relevant a match in this field.</p>
<h3 id="fuzzy-matching">Fuzzy matching</h3>
<p>With <code translate="no">suggest: true</code>, the search falls back to fuzzy matching when nothing matches strictly, so a typo still returns results.</p>
<h3 id="recent-searches">Recent searches</h3>
<p>The last selected results are stored in the browser (<code translate="no">localStorage</code>, one list per language) and displayed in a "Recent" group when the search box is opened. The <code translate="no">recent</code> option sets their maximum number (<code translate="no">5</code> by default), or disables them with <code translate="no">0</code>.</p>]]>
    </content>
  </entry>
  <entry xml:lang="en">
    <id>https://cecilapp.github.io/theme-flexsearch/docs/getting-started/</id>
    <title>Getting started</title>
    <published>2026-10-20T02:19:06+00:00</published>
    <link href="https://cecilapp.github.io/theme-flexsearch/docs/getting-started/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<h1>Getting started</h1>
<p>The <em>FlexSearch</em> component theme adds a client side full-text search to a Cecil website: the search index is generated at build time, and searched in the browser with the FlexSearch library. No server, no external service.</p>
<h2 id="installation">Installation</h2>
<p>Install the theme with Composer:</p>
<pre><code class="language-bash hljs bash" translate="no">composer require cecil/theme-flexsearch</code></pre>
<p>Or download the latest archive and uncompress its contents in the <code translate="no">themes/flexsearch</code> directory.</p>
<h2 id="enable-the-theme">Enable the theme</h2>
<p>Add <code translate="no">flexsearch</code> in the <code translate="no">theme</code> section of the configuration:</p>
<pre><code class="language-yaml hljs yaml" translate="no"><span class="hljs-attr">theme:</span>
  <span class="hljs-bullet">-</span> <span class="hljs-string">flexsearch</span></code></pre>
<h2 id="add-the-search-box">Add the search box</h2>
<p>Add the stylesheet in the <code translate="no">&lt;head&gt;</code> of the main template, then include the search box where the trigger button should be displayed, for example in the header:</p>
<pre><code class="language-twig hljs twig" translate="no"><span class="hljs-template-variable">{{ html(asset('flexsearch/flexsearch.css')) }}</span><span class="xml">
</span><span class="hljs-template-variable">{{ <span class="hljs-name">include</span><span class="hljs-params">('partials/flexsearch.html.twig')</span> }}</span></code></pre>
<h3 id="custom-trigger">Custom trigger</h3>
<p>Any element with a <code translate="no">data-flexsearch-open</code> attribute opens the modal, for example a link in the navigation menu.</p>]]>
    </content>
  </entry>
  <entry xml:lang="en">
    <id>https://cecilapp.github.io/theme-flexsearch/docs/guides/styles/</id>
    <title>Styles</title>
    <published>2026-10-20T02:19:06+00:00</published>
    <link href="https://cecilapp.github.io/theme-flexsearch/docs/guides/styles/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<h1>Styles</h1>
<p>Colors and sizes of the search box are defined as CSS custom properties, with light and dark defaults.</p>
<h2 id="dark-mode">Dark mode</h2>
<p>The dark mode follows the system preference, unless the root element has a <code translate="no">data-theme</code> attribute, as set by the theme selector of this demo: try it with the button next to the search box.</p>
<h2 id="custom-properties">Custom properties</h2>
<p>Override the custom properties in your own stylesheet, for example to use the accent color of your website:</p>
<pre><code class="language-css hljs css" translate="no"><span class="hljs-selector-pseudo">:root</span> {
  <span class="hljs-attribute">--flexsearch-accent</span>: <span class="hljs-number">#163c56</span>;
  <span class="hljs-attribute">--flexsearch-selected-bg</span>: <span class="hljs-number">#f2d07f</span>;
}</code></pre>
<p>All elements have a <code translate="no">flexsearch-*</code> class, so the styles can also be fully replaced.</p>]]>
    </content>
  </entry>
  <entry xml:lang="en">
    <id>https://cecilapp.github.io/theme-flexsearch/docs/guides/translations/</id>
    <title>Translations</title>
    <published>2026-10-20T02:19:06+00:00</published>
    <link href="https://cecilapp.github.io/theme-flexsearch/docs/guides/translations/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<h1>Translations</h1>
<p>The search box is translated in English and French, and an index is generated for each language of the website: switch to French with the link in the footer, the search only returns French pages.</p>
<h2 id="add-a-language">Add a language</h2>
<p>Extract the strings to translate in another language with the following command, then translate the generated file:</p>
<pre><code class="language-bash hljs bash" translate="no">cecil util:translations:extract --locale=&lt;locale&gt; --save --theme=flexsearch</code></pre>]]>
    </content>
  </entry>
  <entry xml:lang="en">
    <id>https://cecilapp.github.io/theme-flexsearch/blog/live-demo/</id>
    <title>A live demo</title>
    <published>2026-10-08T00:00:00+00:00</published>
    <link href="https://cecilapp.github.io/theme-flexsearch/blog/live-demo/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<h1>A live demo</h1>
<p>The theme now comes with a live demo: this website, built with Cecil and deployed to GitHub Pages on every change of the theme. Try the search box above!</p>]]>
    </content>
  </entry>
  <entry xml:lang="en">
    <id>https://cecilapp.github.io/theme-flexsearch/blog/grouped-results/</id>
    <title>Results grouped by section</title>
    <published>2026-08-02T00:00:00+00:00</published>
    <link href="https://cecilapp.github.io/theme-flexsearch/blog/grouped-results/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<h1>Results grouped by section</h1>
<p>Search results are now grouped by section: documentation pages and blog posts no longer compete for the first places. Each group has its own limit, and blog posts can display their date instead of a breadcrumb.</p>]]>
    </content>
  </entry>
  <entry xml:lang="en">
    <id>https://cecilapp.github.io/theme-flexsearch/blog/first-release/</id>
    <title>First release of the FlexSearch theme</title>
    <published>2026-06-15T00:00:00+00:00</published>
    <link href="https://cecilapp.github.io/theme-flexsearch/blog/first-release/" rel="alternate" type="text/html" />
    <content type="html">
      <![CDATA[<h1>First release of the FlexSearch theme</h1>
<p>We are happy to announce the first release of the <em>FlexSearch</em> component theme for Cecil. It brings a client side full-text search to any Cecil website, with a keyboard friendly modal inspired by DocSearch.</p>
<h2 id="what-s-inside">What's inside</h2>
<p>The index is a static JSON file generated at build time, and the FlexSearch library is loaded lazily, on the first search only.</p>]]>
    </content>
  </entry>
</feed>
