diff options
| author | Jieiku | 2024-08-05 18:07:12 -0700 |
|---|---|---|
| committer | Jieiku | 2024-08-05 18:07:12 -0700 |
| commit | 6c195035966d1b1d2cac50f9aacc3617b3a0e475 (patch) | |
| tree | 1e6b12dafd9d214ae86d09db96cab3119503e366 /content/overview-abridge/index.md | |
| parent | 8e7498017f7d423cf45dc58dc9d254904ccd08d0 (diff) | |
| download | abridge-6c195035966d1b1d2cac50f9aacc3617b3a0e475.tar.gz abridge-6c195035966d1b1d2cac50f9aacc3617b3a0e475.tar.bz2 abridge-6c195035966d1b1d2cac50f9aacc3617b3a0e475.zip | |
simplify switching search library
Diffstat (limited to 'content/overview-abridge/index.md')
| -rw-r--r-- | content/overview-abridge/index.md | 68 |
1 files changed, 29 insertions, 39 deletions
diff --git a/content/overview-abridge/index.md b/content/overview-abridge/index.md index 0a306cc..ce7d7ca 100644 --- a/content/overview-abridge/index.md +++ b/content/overview-abridge/index.md @@ -27,7 +27,7 @@ A fast, lightweight, and modern [Zola](https://getzola.org) theme utilizing [abr - [X] Numbered code blocks with [line highlighting](https://abridge.netlify.app/overview-code-blocks/#toml). - [X] Entirely Offline Site by using the PWA **or** by setting `offline = true` in `config.toml` (full search support). - [X] Multi-language support. -- [X] Search support. (elasticlunr, tinysearch, stork) +- [X] Search support. ([elasticlunr](https://abridge.pages.dev/), [pagefind](https://jieiku.github.io/abridge-pagefind/), [tinysearch](https://jieiku.github.io/abridge-tinysearch/)) - [X] Search Suggestions navigation keys, `/` focus, `arrow` move, `enter` select, `escape` close. - [X] Search Results Page, type search query then hit `Enter Key` or `click` the search button icon. - [X] [SEO](#seo-and-header-tags) support. (Search Engine Optimization) @@ -106,7 +106,7 @@ rsync themes/abridge/package.json package.json - `COPY-TO-ROOT-SASS/abridge.scss` overrides to customize Abridge variables. - `netlify.toml` settings to deploy your repo with netlfiy. - `package_abridge.js` node script to: update cache files list in PWA, minify js, bundle js -- `package.json` to switch between nosearch, elasticlunr, tinysearch, stork. +- `package.json` used by node, defines scripts and dependencies. Uncomment the theme line in your project's root config.toml: @@ -325,65 +325,55 @@ All that is necessary is `zola build && npm run abridge`. #### Switch Search Library -In addition to elasticlunr abridge also supports tinysearch and stork. +In addition to elasticlunr abridge also supports pagefind and tinysearch. -tinysearch demo: https://jieiku.github.io/abridge-tinysearch/ +pagefind demo: https://jieiku.github.io/abridge-pagefind/ -stork demo: https://jieiku.github.io/abridge-stork/ +tinysearch demo: https://jieiku.github.io/abridge-tinysearch/ -To use tinysearch/stork extra steps are required. +To use tinysearch extra steps are required. -**Switch to tinysearch:** - -First you have to install tinysearch so that you can build the index: +**Switch to pagefind:** ```bash -git clone https://github.com/tinysearch/tinysearch -cd tinysearch -cargo build --release -sudo cp ./target/release/tinysearch /usr/local/bin/tinysearch -exit # reload shell environment -``` - -Switch Abridge to tinysearch: -```bash -npm run tinysearch -zola build -tinysearch --optimize --path static public/data_tinysearch/index.html +npm install +sed -i 's/^search_library =.*/search_library = "pagefind"/' config.toml +npm run abridge # zola serve ``` -**Switch to stork:** - -First you have to install stork so that you can build the index: +**Switch to elasticlunr:** ```bash -git clone https://github.com/jameslittle230/stork -cd stork -cargo build --release -sudo cp ./target/release/stork /usr/local/bin/stork -exit # reload shell environment +sed -i 's/^search_library =.*/search_library = "elasticlunr"/' config.toml +npm run abridge ``` -Switch Abridge to stork: +**Switch to nosearch:** ```bash -npm run stork -zola build -stork build --input public/data_stork/index.html --output static/stork.st -# zola serve +sed -i 's/^search_library =.*/search_library = "false"/' config.toml +npm run abridge ``` -**Switch to elasticlunr:** +**Switch to tinysearch:** + +First you have to install tinysearch so that you can build the index: ```bash -npm run elasticlunr +git clone https://github.com/tinysearch/tinysearch +cd tinysearch +cargo build --release +sudo cp ./target/release/tinysearch /usr/local/bin/tinysearch +exit # reload shell environment ``` -**Switch to nosearch:** - +Switch Abridge to tinysearch: ```bash -npm run nosearch +sed -i 's/^search_library =.*/search_library = "tinysearch"/' config.toml +npm run abridge +tinysearch --optimize --path static public/data_tinysearch/index.html +# zola serve ``` #### Theme-Switcher |
