aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJieiku2024-08-05 18:07:12 -0700
committerJieiku2024-08-05 18:07:12 -0700
commit6c195035966d1b1d2cac50f9aacc3617b3a0e475 (patch)
tree1e6b12dafd9d214ae86d09db96cab3119503e366
parent8e7498017f7d423cf45dc58dc9d254904ccd08d0 (diff)
downloadabridge-6c195035966d1b1d2cac50f9aacc3617b3a0e475.tar.gz
abridge-6c195035966d1b1d2cac50f9aacc3617b3a0e475.tar.bz2
abridge-6c195035966d1b1d2cac50f9aacc3617b3a0e475.zip
simplify switching search library
-rw-r--r--README.md2
-rw-r--r--config.toml29
-rw-r--r--content/overview-abridge/index.fr.md452
-rw-r--r--content/overview-abridge/index.md68
-rw-r--r--content/static/stork_toml.md5
-rw-r--r--[-rwxr-xr-x]i18n/nl.toml0
-rw-r--r--package.json4
-rw-r--r--package_abridge.js66
-rw-r--r--sass/abridge.scss7
-rw-r--r--static/js/pagefind-entry.json2
-rw-r--r--static/js/pagefind.index.cjs (renamed from static/js/pagefind.index.js)0
-rw-r--r--static/js/pagefind.search.js22
-rw-r--r--static/js/searchChange.js68
-rw-r--r--static/js/search_stork.min.js1
-rw-r--r--static/js/stork.js2
-rw-r--r--static/js/stork_config.js25
-rw-r--r--static/sw.js2
-rw-r--r--static/sw.min.js2
-rw-r--r--static/tinysearch_engine_bg.wasmbin0 -> 97522 bytes
-rw-r--r--templates/404.html2
-rw-r--r--templates/archive.html2
-rw-r--r--templates/base.html6
-rw-r--r--templates/categories/list.html2
-rw-r--r--templates/categories/single.html2
-rw-r--r--templates/index.html3
-rw-r--r--templates/macros/create_stork_toml.html15
-rw-r--r--templates/macros/macros.html18
-rw-r--r--templates/partials/head.html4
-rw-r--r--templates/partials/head_js.html8
-rw-r--r--templates/stork_toml.html9
-rw-r--r--templates/tags/list.html2
-rw-r--r--templates/tags/single.html2
32 files changed, 106 insertions, 726 deletions
diff --git a/README.md b/README.md
index 1717fba..acda8e2 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ The Abridge.css demo is simply using Abridge theme as a submodule: [config.toml]
- [X] Numbered code blocks with [line highlighting](https://abridge.pages.dev/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](https://abridge.pages.dev/overview-abridge/#seo-and-header-tags) support. (Search Engine Optimization)
diff --git a/config.toml b/config.toml
index e07993c..c47bc35 100644
--- a/config.toml
+++ b/config.toml
@@ -93,7 +93,7 @@ taxonomies = [
menu = [
# {url = "blog", name = "Blog", slash = true, blank = false, size="s110"},
- {url = "about", name = "About", slash = true, blank = false, size="s110"},
+# {url = "about", name = "About", slash = true, blank = false, size="s110"},
{url = "archive", name = "Posts", slash = true, blank = false, size="s110"},
# {url = "categories", name = "Categories", slash = true, blank = false, size="s110"},
{url = "tags", name = "Tags", slash = true, blank = false, size="s110"},
@@ -197,25 +197,18 @@ youtube = "channel/your-channel-id"
### You can load extra css files if you need to, just separate by comma:
### stylesheets = [ "abridge.css", "extra.css" ]
### search_library, library to use. valid values:
-### false, "elasticlunr", "tinysearch", "stork", "pagefind"
-### offline: implies uglyurls=true and integrity=false, when true NPM/node will
-### automatically set the path for the base_url, it will build the site,
-### then set the base_url back to what it was. This is a way to build a completely
-### offline site, a feature not possible with Zola alone.
-### The PWA feature is another way to build an offline site, so there are now two
-### different ways to build an offline site with Abridge.
+### false, "elasticlunr", "elasticlunrjava", "pagefind", "tinysearch", "offline"
+### elasticlunr - elasticlunr using the elasticlunr_json index format
+### elasticlunrjava - elasticlunr using the elasticlunr_javascript index format
+### pagefind - pagefind using the fuse_json index format
+### tinysearch - tinysearch using the fuse_json index format
+### offline - elasticlunr using the elasticlunr_javascript index format with content paths relative to the location on disk.
+### (offline: implies uglyurls=true and integrity=false, node script will pass base_url argument as the path on disk.)
###
-### For most people the value of online_url will be the same as base_url.
-### online_url is used to restore the base_url after generating an Offline site.
-### When you set offline = true and run the npm script, the base_url is set to the absolute path on disk.
-### Once you set offline = false, the base_url will be set back to the value of online_url when you run the npm script again.
+### The PWA feature is another way to build an offline site, so there are now two
+### different ways to build an offline site with Abridge.
###############################################################################
-# do NOT include a trailing slash on the online URL
-#online_url = "https://abridge.netlify.app"
-online_indexformat = "elasticlunr_json"# used to restore your preferred index format when offline = false
-offline = false # implies uglyurls=true and integrity=false, when true NPM/node will automatically set the path for the base_url, it will build the site, then set the base_url back to what it was.
-
uglyurls = false # if set to true then links are generated with the full path. eg https://abridge.netlify.app/index.html
integrity = true # increases site security, should normally be true. (setting to false is useful during js development)
js_bundle = true # multiple javascript files combined into a single file (setting to false is useful during js development)
@@ -226,7 +219,7 @@ js_prestyle = true # used to preload: FontAwesome, Katex, external Google Fonts
js_switcher = true # The button that allows manually changing between light/dark mode.
js_switcher_default = "dark" # default nojs switcher mode: dark, light (make sure to also set $switcherDefault in abridge.scss)
-search_library = "elasticlunr"
+search_library = "elasticlunr"
stylesheets = ["abridge.css"]
webmanifest = "manifest.min.json" # Required for PWAs
diff --git a/content/overview-abridge/index.fr.md b/content/overview-abridge/index.fr.md
deleted file mode 100644
index b3c9208..0000000
--- a/content/overview-abridge/index.fr.md
+++ /dev/null
@@ -1,452 +0,0 @@
-+++
-title = "Abridge Zola Thème"
-description = "Abridge est un thème Zola rapide et léger utilisant du HTML sémantique, du CSS léger de classe abridge.css et No Mandatory JS."
-date = 2022-05-17
-updated = 2023-07-21
-draft = false
-
-[taxonomies]
-tags = ["Features","Config"]
-[extra]
-toc = true
-series = "Features"
-+++
-
-Un thème [Zola](https://getzola.org) rapide, léger et moderne utilisant [abridge.css](https://github.com/Jieiku/abridge.css) (un framework HTML CSS sémantique léger en classe ). Scores parfait [Lighthouse](https://pagespeed.web.dev/report?url=abridge.netlify.app), [YellowLabTools](https://yellowlab.tools/) et [Observatory](https://observatory.mozilla.org/analyze/abridge.netlify.app). Voici une page [Zola Themes Benchmarks](https://github.com/Jieiku/zola-themes-benchmarks/blob/main/README.md).
-<!-- more -->
-
-![lighthouse](lighthouse.png)
-
-## Features
-
-- [X] Scores parfait [Lighthouse](https://pagespeed.web.dev/report?url=abridge.netlify.app), [YellowLabTools](https://yellowlab.tools/) et [Observatory](https://observatory.mozilla.org/analyze/abridge.netlify.app)
-- [X] [Prise en charge des PWA](#pwa-application-web-progressive) (Application Web progressive).
-- [X] Tout JavaScript peut être [entièrement désactivé](https://abridge.netlify.app/overview-abridge/#javascript-files).
-- [X] Thèmes sombre, clair, automatique et Switcher. (les couleurs peuvent être personnalisées, variables CSS)
-- [X] Code [surlignage de la syntaxe](https://abridge.netlify.app/overview-code-blocks/). (les couleurs peuvent être personnalisées, variables CSS)
-- [X] Blocs de code numérotés avec [mise en évidence des lignes](https://abridge.netlify.app/overview-code-blocks/#toml).
-- [X] Site entièrement hors ligne en utilisant la PWA **ou** en définissant `offline = true` dans `config.toml` (prise en charge complète de la recherche).
-- [X] Prise en charge multilingue.
-- [X] Aide à la recherche. (elasticlunr, tinysearch, cigogne)
-- [X] Suggestions de recherche touches de navigation, focus `/`, déplacement `flèche`, sélection `entrée`, fermeture `évasion`.
-- [X] Page des résultats de recherche, tapez la requête de recherche, puis appuyez sur `Entrée` ou `cliquez` sur l'icône du bouton de recherche.
-- [X] [SEO](#seo-et-balises-d-en-tete) soutien. (Optimisation du moteur de recherche)
-- [X] [Pagination](#pagination) avec paginateur numéroté sur index.
-- [X] Liens vers les articles précédents et suivants basés sur le titre au bas de l'article.
-- [X] Table des matières dans la page Index (liens facultatifs cliquables)
-- [X] Blocage des messages récents. (Facultatif)
-- [X] Bouton Retour en haut. (utilise uniquement CSS)
-- [X] Bouton de copie des blocs de code.
-- [X] Lien d’e-mail dans l’obscurcissement du pied de page. (anti-spam)
-- [X] [KaTeX](https://katex.org/) soutien.
-- [X] [Page d'archives](https://abridge.netlify.app/archive/).
-- [x] [Mots clés](https://abridge.netlify.app/tags/).
-- [x] Catégories. (similaire aux Tags, désactivés/commentés par défaut)
-- [x] Liens vers les icônes sociales dans le pied de page.
-- [X] Conception réactive. (mobile d'abord)
-- [X] Vidéo Shortcodes: [Youtube](https://abridge.netlify.app/video-streaming-sites/overview-embed-youtube/), [Vimeo](https://abridge.netlify.app/video-streaming-sites/overview-embed-vimeo/), [Streamable](https://abridge.netlify.app/video-streaming-sites/overview-embed-streamable/).
-- [X] Médias Shortcodes: [video](https://abridge.netlify.app/overview-rich-content/#video), [img](https://abridge.netlify.app/overview-images/#img-shortcode), [imgswap](https://abridge.netlify.app/overview-images/#imgswap-shortcode), [image](https://abridge.netlify.app/overview-rich-content/#image), [gif](https://abridge.netlify.app/overview-rich-content/#gif), [audio](https://abridge.netlify.app/overview-rich-content/#audio).
-- [X] Autre Shortcodes: [showdata](https://abridge.netlify.app/overview-showdata/), [katex](https://abridge.netlify.app/overview-math/#usage-1).
-
-## Démarrage rapide
-
-Ce thème nécessite une version {{ showdata(src="https://raw.githubusercontent.com/Jieiku/abridge/master/theme.toml" key="min_version" type="toml") }} ou plus tard de [Zola](https://www.getzola.org/documentation/getting-started/installation/)
-
-```bash
-git clone https://github.com/jieiku/abridge.git
-cd abridge
-zola serve
-# open http://127.0.0.1:1111/ in the browser
-```
-
-## Installation
-
-Le démarrage rapide montre comment exécuter le thème directement. Ensuite, nous utiliserons abridge comme thème pour un NOUVEAU site.
-
-### 1: Créer un nouveau site zola
-
-```bash
-zola init mysite
-cd mysite
-```
-
-### 2: Installer abridge
-
-Ajoutez le thème en tant que sous-module git :
-
-```bash
-git init # si votre projet est déjà un dépôt git, ignorez cette commande
-git submodule add https://github.com/jieiku/abridge.git themes/abridge
-```
-
-Ou clonez le thème dans votre répertoire de thèmes:
-
-```bash
-git clone https://github.com/jieiku/abridge.git themes/abridge
-```
-
-### 3: Configuration
-
-Copiez certains fichiers du répertoire du thème vers le répertoire racine de votre projet:
-
-```bash
-touch templates/.gitkeep
-rsync themes/abridge/config.toml config.toml
-rsync themes/abridge/content/_index.md content/
-rsync themes/abridge/COPY-TO-ROOT-SASS/* sass/
-rsync themes/abridge/netlify.toml netlify.toml
-rsync themes/abridge/package_abridge.js package_abridge.js
-rsync themes/abridge/package.json package.json
-```
-
-- `templates/.gitkeep` le répertoire des modèles est requis dans votre site de base. [#2150](https://github.com/getzola/zola/issues/2150)
-- `config.toml` configuration de base avec toutes les valeurs de configuration.
-- `content/_index.md` requis pour définir la pagination.
-- `COPY-TO-ROOT-SASS/abridge.scss` remplace pour personnaliser les variables Abridge.
-- `netlify.toml` paramètres pour déployer votre dépôt avec netlify
-- `package_abridge.js` script de nœud pour: mettre à jour la liste des fichiers de cache dans PWA, réduire js, regrouper js
-- `package.json` pour basculer entre nosearch, elasticlunr, tinysearch, stork.
-
-Décommentez la ligne de thème dans le fichier racine config.toml de votre projet:
-```bash
-sed -i 's/^#theme = "abridge"/theme = "abridge"/' config.toml
-```
-
-### 4: Ajouter du nouveau contenu
-
-Copiez le contenu du répertoire du thème dans votre projet ou créez un nouveau message:
-
-```bash
-rsync -r themes/abridge/content .
-```
-
-### 5: Exécuter le projet
-
-Exécutez simplement `zola serve` dans le chemin racine du projet:
-
-```bash
-zola serve
-```
-
-Zola démarrera le serveur web de développement, accessible par défaut à `http://127.0.0.1:1111`.
-
-Les modifications enregistrées seront rechargées en direct dans le navigateur. (appuyez sur `ctrl+f5`, ou pendant le développement, définissez `pwa=false` dans `config.toml`)
-
-## Pagination
-
-Vous pouvez définir le nombre d'éléments de la page d'accueil en éditant le fichier `content\_index.md` et en ajustant `paginate_by`
-
-## Remplacements Sass
-
-Les variables Abridge SASS peuvent être remplacées en éditant le fichier `sass\abridge.scss` dans le dossier sass racine de votre projet.
-
-### Largeur de page
-
-```scss
-$mw:75%,// largeur maximale
-```
-
-### Modes thématiques abrégés
-
-```scss
-$abridgeMode: "switcher",//valeurs valides: switcher, auto, dark, light
-```
-
-- switcher: affiche automatiquement une version sombre ou claire en fonction des paramètres du navigateur/système d'exploitation et dispose d'un sélecteur de thème javascript cliquable par l'utilisateur.
-- auto: affiche automatiquement une version sombre ou claire en fonction des paramètres du navigateur/système d'exploitation.
-- dark: est toujours le thème sombre.
-- light: est toujours le thème de la lumière.
-
-### Couleurs et styles
-
-Vous pouvez spécifier le modèle de couleur que vous souhaitez utiliser comme base:
-```scss
-$color: "orange",// modèle de couleur à utiliser/remplacer: orange, blue, blueshade
-```
-
-Remplacez ensuite les couleurs individuelles si nécessaire:
-```scss
-/// Couleurs sombres
-$f1d: #ccc,// Couleur de police principale
-$f2d: #ddd,// En-têtes de couleur de police
-$c1d: #111,// Couleur d'arrière-plan primaire
-$c2d: #222,// Couleur d'arrière-plan secondaire
-...
-```
-
-### Icônes sociales de pied de page
-
-Vous devez configurer les icônes sociales que vous envisagez d'utiliser. (rend la taille du fichier CSS plus petite)
-
-Pour simplement les désactiver tous, vous pouvez définir `$enable-icons: false` (désactive TOUTES les icônes, la navigation, la recherche, etc.)
-
-Sinon, activez uniquement les icônes dont vous avez besoin, par exemple pour le courrier que vous définiriez `$icon-mail: true`
-
-Vous devez ensuite désactiver toutes les autres icônes que vous n'utilisez pas.
-
-### Thème des visites noscript
-
-Si vous avez configuré Abridge pour utiliser le mode de commutation au lieu de auto/dark/light, alors votre site aura un bouton qui permettra au visiteur de basculer le thème.
-
-Si votre visiteur utilise noscript ou un autre module complémentaire de navigateur bloquant Javascript, il sera alors bloqué avec le thème par défaut configuré pour le mode de commutation.
-
-Pour ajuster ce mode, vous devez définir les deux valeurs de configuration suivantes dans `abridge.scss` **ET** `config.toml`:
-
-```scss
-$switcherDefault: "dark",// mode de commutation nojs par défaut: dark, light (assurez-vous de définir également js_switcher_default dans config.toml)
-```
-
-```toml
-js_switcher_default = "dark" # mode de commutation nojs par défaut: dark, light (assurez-vous de définir également $switcherDefault dans abridge.scss)
-```
-
-Par défaut, abridge utilise le mode sombre pour le sélecteur, donc à moins que vous ne souhaitiez définir le mode par défaut sur clair pour les visiteurs nojs/noscript, vous n'avez pas à vous soucier de ces paramètres.
-
-## Config.toml Configuration
-
-La plupart des options de `config.toml` sont auto-documentées. (évident entre le nom de la valeur de configuration et les commentaires)
-
-Abridge fonctionnera avec un `config.toml` barebones car les valeurs par défaut sont fournies dans les fichiers modèles.
-
-Je recommande de copier l'intégralité du fichier config.toml comme indiqué à l'étape 3 car il fournit toutes les valeurs configurables.
-
-### Menus du haut et du pied de page
-
-Définissez un champ dans `extra` avec une clé de `menu` et `menu_footer`.
-Si vous souhaitez que le lien s'ouvre dans un nouvel onglet/navigateur, définissez `blank = true`.
-taille : s150, s140, s130, s120, s110, s95, s90, s85, s80, s75, s70, faux (pleine taille)
-Si un lien doit avoir une barre oblique à la fin de l'URL définie `slash = true`.
-(généralement, tous les liens doivent avoir une barre oblique finale, sauf s'il s'agit d'un lien de fichier tel que `sitemap.xml`)
-
-```toml
-menu = [
- {url = "about", name = "About", slash = true, blank = false, size="s110"},
- {url = "posts", name = "Posts", slash = true, blank = false, size="s110"},
- {url = "categories", name = "Categories", slash = true, blank = false, size="s110"},
- {url = "tags", name = "Tags", slash = true, blank = false, size="s110"},
-]
-menu_footer = [
- {url = "about", name = "About", slash = true, blank = false},
- {url = "contact", name = "Contact", slash = true, blank = false},
- {url = "privacy", name = "Privacy", slash = true, blank = false},
- {url = "sitemap.xml", name = "Sitemap", slash = false, blank = true},
-]
-```
-
-### SEO et balises d’en-tête
-
-Vous pouvez consulter les balises SEO dans la macro SEO située dans `templates/macros/seo.html`, toutes les valeurs configurables doivent être dans `config.toml` sous `config.extra` ou dans les fichiers de démarque de contenu.
-
-Dans votre fichier de démarque, vous devez définir un titre de moins de 60 caractères et une description entre 80 et 160 caractères. La description est ce qui est affiché dans les résultats de recherche sous le titre de la page. Partout où vous ne définissez pas de description de page, le fichier config.description du site principal sera utilisé à la place.
-
-Vous devez également définir des mots-clés spécifiques à la page, à moins que vos mots-clés définis dans config.toml suffisent, tous les mots-clés que vous ajoutez à la page s'ajoutent à ceux définis dans config.toml, n'ajoutez donc pas ces mêmes mots-clés aux mots-clés de votre page.
-
-Vous pouvez éventuellement également définir une image spécifique à la page pour les résultats de recherche en utilisant page.extra.thumbnail. Les cartes Facebook, Twitter et OpenGraph sont prises en charge (image et description automatiques pour les liens publiés). OpenGraph recommande 1200 x 630 (1,9:1). Twitter recommande 2:1 pour les grands et 1:1 pour les petits. Si vous ne définissez pas de miniature spécifique à la page, la bannière définie dans config.toml sera utilisée à la place.
-
-Faire référence à [overview-images](https://raw.githubusercontent.com/Jieiku/abridge/master/content/overview-images/index.md) à titre d'exemple:
-```md
-+++
-title = "Codes courts d'image"
-description = "Les images peuvent être intégrées directement à l'aide de markdown `![Ferris](ferris.svg)`, mais l'utilisation d'un shortcode empêche CLS en définissant explicitement la largeur et la hauteur."
-date = 2021-05-19
-draft = false
-
-[taxonomies]
-tags = ["Features","Shortcodes","Images"]
-[extra]
-toc = true
-keywords = "Image, Markdown, Shortcodes, Swap"
-thumbnail = "ferris-gesture.png"
-+++
-```
-
-### Notation mathématique KaTeX
-
-KaTeX peut être utilisé pour afficher des mathématiques complexes, il s'agit d'une « composition mathématique rapide pour le Web ».
-
-Vous pouvez voir une démo sur [cette page](https://abridge.netlify.app/overview-math/).
-
-Pour de meilleures performances, je recommande d'activer uniquement les mathématiques sur une [base par page dans vos fichiers post.md](https://github.com/Jieiku/abridge/blob/master/content/overview-math.md?plain=1#L11-L13), au lieu de dans votre fichier config.toml principal.
-
-### PWA, application Web progressive
-
-Le thème Abridge prend en charge PWA. Vous pouvez installer l’intégralité du site en tant qu’application et le faire fonctionner hors ligne. Pour l'essayer, utilisez simplement Google Chrome ou votre téléphone et allez ici: [abridge.netlify.app](https://abridge.netlify.app/)
-
-Si vous utilisez Chrome sur un ordinateur de bureau, regardez à la fin de la barre d'adresse le bouton d'installation. Sur Android, vous devriez obtenir une fenêtre contextuelle à installer, vous pouvez également installer à partir du menu à 3 points dans le coin supérieur droit. Une fois la PWA installée, vous pouvez vous déconnecter complètement et vous pourrez toujours parcourir ou rechercher sur le site!
-
-Pour l'utiliser dans votre propre instance, vous devrez éditer `static/sw.js` pour la liste des fichiers à mettre en cache. Techniquement, vous n'avez pas besoin de modifier `sw.js`, mais si même un seul fichier est manquant dans la liste de cache, la liste ne sera pas pré-mise en cache, elle ne sera donc mise en cache que pendant votre navigation.
-
-Il existe un script npm pour générer la liste de cache de fichiers et la minification `npm run abridge`. Mon fichier `netlify.toml` exécute automatiquement ce script npm lors du déploiement du site, donc tout est automatique. Si Zola était capable de modéliser un fichier js, il serait peut-être possible de générer dynamiquement la liste des fichiers cache lors de la construction.
-
-La fonctionnalité PWA est également facile à désactiver en définissant simplement `pwa = false` dans `config.toml`
-
-## Optimisation des performances
-
-### Fichiers Javascript
-
-Tout javascript peut être désactivé dans `config.toml`:
-
-```toml
-build_search_index = false
-
-js_bundle = false
-js_copycode = false
-js_email_encode = false
-js_prestyle = false
-js_switcher = false
-
-pwa = false
-```
-
-Voici les fichiers javascript utilisés par Abridge :
-
-- search_index.en.js: index de recherche généré par zola à chaque build pour elasticlunr.
-- elasticlunr.min.js: bibliothèque de recherche pour la recherche côté client.
-- search.js: pour utiliser elasticlunr depuis le champ de recherche de nos sites pour les suggestions et la page de résultats.
-- email.js: utilise javascript pour masquer votre véritable adresse e-mail grâce à l'icône de courrier en bas de la page.
-- codecopy.js: ajoutez un bouton Copier aux blocs de code, pour copier le contenu du bloc de code dans le presse-papiers.
-- theme.js: petit script pour faciliter le stockage local du sélecteur de thème. (jamais groupé, toujours séparé)
-- theme_button.js: petit script pour la fonction de changement de thème lorsque vous cliquez sur le bouton de changement de thème.
-- prestyle.js: Utilisé pour précharger les fichiers CSS `<link rel="preload"` - ce script les change en `<link rel="stylesheet"` une fois le chargement de la page terminé, cela nous permet de charger des feuilles de style pour les polices externes , fontawesome ou katex de manière non bloquante.
-- sw.js: il s'agit du fichier Service Worker pour la PWA.
-- sw_load.js: ce fichier gère le chargement du Service Worker pour la PWA.
-
-#### option js_bundle
-
-`js_bundle` lorsqu'il est défini sur true sert un fichier bundle au lieu de tous les fichiers js individuels.
-
-Tous les bundles nécessaires sont générés dynamiquement par le script de nœud [package_abridge.js](https://github.com/Jieiku/abridge/blob/master/package_abridge.js)
-
-Le script de nœud analysera votre config.toml pour rechercher les valeurs de configuration pertinentes, puis, en fonction de votre config.tomnl, générera les bundles requis.
-
-Tout ce qui est nécessaire est `zola build && npm run abridge`.
-
-#### Changer de bibliothèque de recherche
-
-En plus d'elasticlunr, abridge prend également en charge tinysearch et stork.
-
-tinysearch démo: https://jieiku.github.io/abridge-tinysearch/
-
-stork démo: https://jieiku.github.io/abridge-stork/
-
-Pour utiliser tinysearch/stork, des étapes supplémentaires sont nécessaires.
-
-**Basculer vers tinysearch:**
-
-Vous devez d’abord installer tinysearch pour pouvoir créer l’index:
-
-```bash
-git clone https://github.com/tinysearch/tinysearch
-cd tinysearch
-cargo build --release
-sudo cp ./target/release/tinysearch /usr/local/bin/tinysearch
-exit # recharger l'environnement shell
-```
-
-Basculer Abridge vers tinysearch:
-```bash
-npm run tinysearch
-zola build
-tinysearch --optimize --path static public/data_tinysearch/index.html
-# zola serve
-```
-
-**Basculer vers stork:**
-
-Vous devez d’abord installer stork pour pouvoir construire l’index:
-
-```bash
-git clone https://github.com/jameslittle230/stork
-cd stork
-cargo build --release
-sudo cp ./target/release/stork /usr/local/bin/stork
-exit # recharger l'environnement shell
-```
-
-Remplacer Abréger par Cigogne:
-
-```bash
-npm run stork
-zola build
-stork build --input public/data_stork/index.html --output static/stork.st
-# zola serve
-```
-
-**Basculer vers elasticlunr:**
-
-```bash
-npm run elasticlunr
-```
-
-**Basculer vers nosearch:**
-
-```bash
-npm run nosearch
-```
-
-#### Changeur de thème
-
-Le sélecteur de thème s'appuie sur javascript pour fonctionner, il applique la classe .light au documentElement racine. Le fichier qui gère cela (`theme.js`) est petit et optimisé et c'est le premier fichier chargé dans la tête, donc l'impact sur les performances est minime. Sans le sélecteur de thème, vous pouvez toujours utiliser le thème automatique qui utilise les paramètres de préférence du navigateur/système d'exploitation. Vous pouvez même installer un [plugin Firefox](https://addons.mozilla.org/en-US/firefox/addon/theme-switcher-for-firefox/) pour basculer rapidement entre les deux.
-
-### Optimiser les fichiers PNG/ICO
-
-Bon outil pour générer des icônes masquables pour `manifest.json`: [maskable.app](https://maskable.app/editor)
-
-Tous les fichiers png peuvent être optimisés à l'aide de [oxipng](https://github.com/shssoichiro/oxipng):
-
-```bash
-cd static
-oxipng -o max --strip all -a -Z *.png
-```
-
-Avec des écrans plus grands et une plus grande densité de pixels devenant monnaie courante, c'est probablement une bonne idée d'utiliser au moins un peu de compression avec perte. Par exemple, vous pouvez utiliser pngquant avec une qualité de 93% et vous obtiendrez souvent des images environ la moitié de la taille. Comprenez que pngquant est cumulatif, vous devez donc conserver vos images originales quelque part et n'utiliser pngquant qu'une seule fois par image, si vous l'utilisez encore et encore sur la même image, vous réduirez la qualité de l'image à chaque fois. Utilisez toujours oxipng par la suite, l'oxipng est sans perte.
-
-```bash
-pngquant --skip-if-larger --strip --quality=93-93 --speed 1 *.png
-oxipng -o max --strip all -a -Z *.png
-```
-
-leanify peut compresser davantage pour les fichiers png et ico:
-
-```bash
-git clone https://github.com/JayXon/Leanify
-cd Leanify
-make
-sudo cp leanify /usr/local/bin/leanify
-exit #lancer un nouveau terminal
-leanify -i 7777 *.png
-leanify -i 7777 *.ico
-```
-
-### Contenu pré-gzip/brotli
-
-Si vous diffusez votre site avec nginx, vous pouvez pré-gzipper votre contenu.
-
-(Netlify brotli compresse automatiquement vos fichiers, aucun travail supplémentaire n'est requis.)
-
-Configurez d’abord nginx:
-
-```bash
-sudo nano /etc/nginx/nginx.conf
-
-gzip on;
-gzip_vary on;
-gzip_proxied expired no-cache no-store private auth;
-#gzip_proxied any;
-gzip_comp_level 9;
-gzip_buffers 64 16k;
-#gzip_buffers 16 8k;
-gzip_http_version 1.1;
-gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml application/xhtml+xml application/x-javascript application/x-font-ttf application/vnd.ms-fontobject font/opentype font/ttf font/eot font/otf;
-#gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
-```
-
-Ensuite, vous pouvez gzip/brotli vos fichiers:
-
-```bash
-zola build
-find ~/.dev/abridge/public -type f -regextype posix-extended -regex '.*\.(htm|html|css|js|xml|xsl|txt|woff|woff2|svg|otf|eot|ttf)' -exec gzip --best -k -f {} \+ -exec brotli --best -f {} \;
-rsync -zvrh ~/.dev/abridge/public/ web:/var/www/abridge
-```
-
-Nginx n'est pas livré par défaut avec le support brotli, mais l'ajouter n'a pas été difficile.
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
diff --git a/content/static/stork_toml.md b/content/static/stork_toml.md
deleted file mode 100644
index e427a93..0000000
--- a/content/static/stork_toml.md
+++ /dev/null
@@ -1,5 +0,0 @@
-+++
-path = "data_stork"
-template = "stork_toml.html"
-draft = true
-+++
diff --git a/i18n/nl.toml b/i18n/nl.toml
index 650b8ea..650b8ea 100755..100644
--- a/i18n/nl.toml
+++ b/i18n/nl.toml
diff --git a/package.json b/package.json
index 954e327..8addd15 100644
--- a/package.json
+++ b/package.json
@@ -6,9 +6,7 @@
"license": "MIT",
"homepage": "https://github.com/Jieiku/abridge",
"scripts": {
- "abridge": "node -e \"if ( require('fs').existsSync('./themes/abridge/package_abridge.js')) {require('fs').copyFileSync('./themes/abridge/package_abridge.js', './package_abridge.js')}\" && node package_abridge.js",
- "search:pagefind": "node -e \"if ( require('fs').existsSync('./themes/abridge/static/js/searchChange.js')) {require('fs').copyFileSync('./themes/abridge/static/js/searchChange.js', './static/js/searchChange.js')}\" && node ./static/js/searchChange.js --pagefind",
- "search:elasticlunr": "node -e \"if ( require('fs').existsSync('./themes/abridge/static/js/searchChange.js')) {require('fs').copyFileSync('./themes/abridge/static/js/searchChange.js', './static/js/searchChange.js')}\" && node ./static/js/searchChange.js --elasticlunr"
+ "abridge": "node -e \"if ( require('fs').existsSync('./themes/abridge/package_abridge.js')) {require('fs').copyFileSync('./themes/abridge/package_abridge.js', './package_abridge.js')}\" && node package_abridge.js"
},
"dependencies": {
"fast-toml": "^0.5.4",
diff --git a/package_abridge.js b/package_abridge.js
index e99d0c5..6be1801 100644
--- a/package_abridge.js
+++ b/package_abridge.js
@@ -21,9 +21,6 @@ const search_library = data.extra.search_library;
const index_format = data.search.index_format;
const uglyurls = data.extra.uglyurls;
const js_bundle = data.extra.js_bundle;
-const offline = data.extra.offline;
-const online_url = data.extra.online_url;
-const online_indexformat = data.extra.online_indexformat;
const pwa = data.extra.pwa;
const pwa_VER = data.extra.pwa_VER;
const pwa_NORM_TTL = data.extra.pwa_NORM_TTL;
@@ -36,7 +33,7 @@ const pwa_BASE_CACHE_FILES = data.extra.pwa_BASE_CACHE_FILES;
// This is used to pass arguments to zola via npm, for example:
// npm run abridge -- "--base-url https://abridge.pages.dev"
-const args = process.argv[2] ? ' '+process.argv[2] : '';
+var args = process.argv[2] ? ' '+process.argv[2] : '';
async function execWrapper(cmd) {
const { stdout, stderr } = await execPromise(cmd);
@@ -51,18 +48,18 @@ async function execWrapper(cmd) {
async function abridge() {
await sync();
const { replaceInFileSync } = await import('replace-in-file');
- if (offline === false) {
- if (typeof online_url !== 'undefined' && typeof online_indexformat !== 'undefined') {
- replaceInFileSync({files: 'config.toml', from: /base_url.*=.*/g, to: "base_url = \""+online_url+"\""});
- replaceInFileSync({files: 'config.toml', from: /index_format.*=.*/g, to: "index_format = \""+online_indexformat+"\""});
- }
- } else if (offline === true) {
- if (typeof online_url !== 'undefined' && typeof online_indexformat !== 'undefined') {
- replaceInFileSync({files: 'config.toml', from: /base_url.*=.*/g, to: "base_url = \""+__dirname+"\/public\""});
- replaceInFileSync({files: 'config.toml', from: /index_format.*=.*/g, to: "index_format = \"elasticlunr_javascript\""});
- } else {
- throw new Error('ERROR: offline = true requires that online_url and online_indexformat are set in config.toml, so that the base_url and index_format can be restored if offline is later set to false.');
- }
+ if (search_library === 'offline') {
+ replaceInFileSync({files: 'config.toml', from: /index_format.*=.*/g, to: "index_format = \"elasticlunr_javascript\""});
+ //replaceInFileSync({files: 'config.toml', from: /base_url.*=.*/g, to: "base_url = \""+__dirname+"\/public\""});
+ args = args + " -u \""+__dirname+"\/public\""
+ } else if (search_library === 'elasticlunrjava') {
+ replaceInFileSync({files: 'config.toml', from: /index_format.*=.*/g, to: "index_format = \"elasticlunr_javascript\""});
+ } else if (search_library === 'elasticlunr') {
+ replaceInFileSync({files: 'config.toml', from: /index_format.*=.*/g, to: "index_format = \"elasticlunr_json\""});
+ } else if (search_library === 'pagefind') {
+ replaceInFileSync({files: 'config.toml', from: /index_format.*=.*/g, to: "index_format = \"fuse_json\""});
+ } else if (search_library === 'tinysearch') {
+ replaceInFileSync({files: 'config.toml', from: /index_format.*=.*/g, to: "index_format = \"fuse_json\""});
}
console.log('Zola Build to generate files for minification:');
@@ -88,9 +85,6 @@ async function abridge() {
}
if (search_library === 'elasticlunr') {
- if (fs.existsSync('content/static/stork_toml.md')) {
- replaceInFileSync({files: 'content/static/stork_toml.md', from: /draft.*=.*/g, to: "draft = true"});
- }
if (fs.existsSync('content/static/tinysearch_json.md')) {
replaceInFileSync({files: 'content/static/tinysearch_json.md', from: /draft.*=.*/g, to: "draft = true"});
}
@@ -98,36 +92,18 @@ async function abridge() {
if (!fs.existsSync('content/static/tinysearch_json.md')) {// 'content/static/tinysearch_json.md' file is missing, copy from abridge theme.
fs.copyFileSync(bpath+'content/static/tinysearch_json.md', 'content/static/tinysearch_json.md',fs.constants.COPYFILE_EXCL);
}
- if (fs.existsSync('content/static/stork_toml.md')) {
- replaceInFileSync({files: 'content/static/stork_toml.md', from: /draft.*=.*/g, to: "draft = true"});
- }
if (fs.existsSync('content/static/tinysearch_json.md')) {
replaceInFileSync({files: 'content/static/tinysearch_json.md', from: /draft.*=.*/g, to: "draft = false"});
}
// zola build && mkdir -p tmp && tinysearch --optimize --path tmp public/data_tinysearch/index.html && rsync -avz tmp/*.wasm static/ && rm -rf tmp
- } else if (search_library === 'stork') {
-
- if (!fs.existsSync('content/static/stork_toml.md')) {// 'content/static/stork_toml.md' file is missing, copy from abridge theme.
- fs.copyFileSync(bpath+'content/static/stork_toml.md', 'content/static/stork_toml.md',fs.constants.COPYFILE_EXCL);
- }
- if (fs.existsSync('content/static/stork_toml.md')) {
- replaceInFileSync({files: 'content/static/stork_toml.md', from: /draft.*=.*/g, to: "draft = false"});
- }
- if (fs.existsSync('content/static/tinysearch_json.md')) {
- replaceInFileSync({files: 'content/static/tinysearch_json.md', from: /draft.*=.*/g, to: "draft = true"});
- }
- // zola build && stork build --input public/data_stork/index.html --output static/stork.st
} else if (search_library === 'pagefind') {
- if (fs.existsSync('content/static/stork_toml.md')) {
- replaceInFileSync({files: 'content/static/stork_toml.md', from: /draft.*=.*/g, to: "draft = true"});
- }
if (fs.existsSync('content/static/tinysearch_json.md')) {
replaceInFileSync({files: 'content/static/tinysearch_json.md', from: /draft.*=.*/g, to: "draft = true"});
}
// Run the pagefind script to generate the index files.
// Has to happen at start otherwise, it happens too late asyncronously.
- const createIndex = require('./static/js/pagefind.index.js'); // run the pagefind index.js script
+ const createIndex = require('./static/js/pagefind.index.cjs'); // run the pagefind index.js script
await createIndex(); // makes program wait for pagefind build execution
}
@@ -205,7 +181,6 @@ async function abridge() {
// Something went wrong with minifying katexbundle, so commenting this out for now
// minify(['static/js/katex.min.js','static/js/mathtex-script-type.min.js','static/js/katex-auto-render.min.js','static/js/katexoptions.js'],'static/js/katexbundle.min.js');
minify(['static/js/elasticlunr.min.js','static/js/search.js'],'static/js/search_elasticlunr.min.js');
- minify(['static/js/stork.js','static/js/stork_config.js'],'static/js/search_stork.min.js');
minify(['static/js/tinysearch.js'],'static/js/search_tinysearch.min.js');
minify(['static/js/prestyle.js','static/js/theme_button.js','static/js/email.js','static/js/codecopy.js','static/js/sw_load.js'],'static/js/abridge_nosearch.min.js');
minify(['static/js/prestyle.js','static/js/theme_button.js','static/js/email.js','static/js/codecopy.js'],'static/js/abridge_nosearch_nopwa.min.js');
@@ -253,25 +228,22 @@ function bundle(bpath,js_prestyle,js_switcher,js_email_encode,js_copycode,search
minify_files.push(bpath+'static/js/codecopy.js');
}
if (search_library) {
- if ((search_library === 'elasticlunr' && offline === true) || (search_library === 'elasticlunr' && index_format === 'elasticlunr_javascript' && uglyurls === true)) {
+ if ((search_library === 'offline' || (search_library === 'elasticlunrjava' && uglyurls === true))) {
minify_files.push('public/search_index.en.js');
minify_files.push(bpath+'static/js/elasticlunr.min.js');
minify_files.push(bpath+'static/js/searchjavaugly.js');
- } else if (search_library === 'elasticlunr' && index_format === 'elasticlunr_javascript') {
+ } else if (search_library === 'elasticlunrjava') {
minify_files.push('public/search_index.en.js');
minify_files.push(bpath+'static/js/elasticlunr.min.js');
minify_files.push(bpath+'static/js/searchjava.js');
} else if (search_library === 'elasticlunr') {//abridge default
minify_files.push(bpath+'static/js/elasticlunr.min.js');
minify_files.push(bpath+'static/js/search.js');
- } else if (search_library === 'stork') {
- minify_files.push(bpath+'static/js/stork.js');
- minify_files.push(bpath+'static/js/stork_config.js');
- } else if (search_library === 'tinysearch') {
- minify_files.push(bpath+'static/js/tinysearch.js');
} else if (search_library === 'pagefind') {
minify_files.push(bpath+'static/js/pagefind.js');
minify_files.push(bpath+'static/js/pagefind.search.js');
+ } else if (search_library === 'tinysearch') {
+ minify_files.push(bpath+'static/js/tinysearch.js');
}
}
if (pwa) {
@@ -384,7 +356,7 @@ async function sync() {
exit(1);
}
console.log(packageVersionLocal, packageVersionSubmodule);
-
+
const configToml = path.join(__dirname, "config.toml");
const submoduleConfigToml = path.join(
__dirname,
diff --git a/sass/abridge.scss b/sass/abridge.scss
index 008f38c..f625a2f 100644
--- a/sass/abridge.scss
+++ b/sass/abridge.scss
@@ -1110,13 +1110,6 @@ $syntax: true !default;//syntax highlighting for code blocks
div:empty {
display: none;
}
- .stork-close-button {
- display: none;
- }
- .stork-title p {
- color: var(--a1);
- font-weight: var(--fh);
- }
#suggestions {
z-index: 9;
background: var(--c1);
diff --git a/static/js/pagefind-entry.json b/static/js/pagefind-entry.json
index 360b8f8..905880c 100644
--- a/static/js/pagefind-entry.json
+++ b/static/js/pagefind-entry.json
@@ -1 +1 @@
-{"version":"1.1.0","languages":{"fr":{"hash":"fr_b34dd2c23f","wasm":"fr","page_count":11},"en":{"hash":"en_88e373ea1f","wasm":"en","page_count":15},"es":{"hash":"es_7556d6166a","wasm":"es","page_count":2}}} \ No newline at end of file
+{"version":"1.1.0","languages":{"en":{"hash":"en_9a3bf9aefa","wasm":"en","page_count":15},"fr":{"hash":"fr_6374b78f36","wasm":"fr","page_count":10},"es":{"hash":"es_f4a7172a38","wasm":"es","page_count":2}}} \ No newline at end of file
diff --git a/static/js/pagefind.index.js b/static/js/pagefind.index.cjs
index 8a685c0..8a685c0 100644
--- a/static/js/pagefind.index.js
+++ b/static/js/pagefind.index.cjs
diff --git a/static/js/pagefind.search.js b/static/js/pagefind.search.js
index 3a61dc3..5936281 100644
--- a/static/js/pagefind.search.js
+++ b/static/js/pagefind.search.js
@@ -1,9 +1,6 @@
window.onload = function () {
if (document.body.contains(document.goSearch)) {
- options({
- basePath: "/js/"
- });
- init();
+ var loaded = false;
document.goSearch.onsubmit = function () { return goSearchNow() };
/*
@@ -60,17 +57,32 @@ window.onload = function () {
document.addEventListener("keydown", inputFocus);
document.addEventListener("click", function (event) { suggestions.contains(event.target) || suggestions.classList.add("d-none") });
+ document.getElementById('searchinput').onfocus = function() {
+ if (!loaded) {
+ lazyLoad();
+ loaded = true;
+ document.body.contains(document.goSearch) && (document.goSearch.onsubmit = function() { return goSearchNow() })
+ }
+ document.getElementById('searchinput').onfocus = '';
+ }
+
var lang = document.documentElement.getAttribute("lang");
var langOnly = lang.substring(0, 2);
var baseUrl = document.querySelector("meta[name='base']").getAttribute("content");
if (baseUrl.slice(-1) == "/") {
baseUrl = baseUrl.slice(0, -1);
}
+ options({
+ basePath: baseUrl + '/js/'
+ });
var index;
searchinput.addEventListener('input', show_results, true);
suggestions.addEventListener('click', accept_suggestion, true);
+ async function lazyLoad() {
+ await init();
+ }
// in page results when press enter or click search icon from search box
function closeSearchNow() {
@@ -244,4 +256,4 @@ window.onload = function () {
document.goSearch.onsubmit = function () { return goSearchNow() };
}());
}
-}; \ No newline at end of file
+};
diff --git a/static/js/searchChange.js b/static/js/searchChange.js
deleted file mode 100644
index 8f776ae..0000000
--- a/static/js/searchChange.js
+++ /dev/null
@@ -1,68 +0,0 @@
-const fs = require('fs');
-const path = require("path");
-// Path for config.toml
-const configTomlPath = path.join(__dirname, "../../config.toml");
-
-async function main() {
- const { replaceInFileSync } = await import('replace-in-file');
- // Process arguments to determine the search mode
- const args = process.argv.slice(2); // Remove the first two default arguments
-
- if (args.length > 0) {
- // Check the search mode based on the argument provided
- switch (args[0]) {
- case '--pagefind':
- console.log('Pagefind search mode activated.');
- await swapToPagefind(replaceInFileSync);
- break;
- case '--elasticlunr':
- console.log('Elasticlunr search mode activated.');
- await swapToElasticlunr(replaceInFileSync);
- break;
- default:
- console.log('Unknown search mode. Please use --pagefind or --elasticlunr.');
- }
- } else {
- console.log('No search mode specified. Please use --pagefind or --elasticlunr.');
- }
-}
-
-main();
-
-async function swapToPagefind(replaceInFileSync) {
- // Edit the config.toml file
- replaceInFileSync({
- files: configTomlPath,
- from: /search_library = ['|"]\w+['|"]/g,
- to: 'search_library = "pagefind"',
- });
- replaceInFileSync({
- files: configTomlPath,
- from: /online_indexformat = ['|"]\w+['|"]/g,
- to: 'online_indexformat = "fuse_json"',
- });
- replaceInFileSync({
- files: configTomlPath,
- from: /index_format = ['|"]\w+['|"]/g,
- to: 'index_format = "fuse_json"',
- });
-}
-
-async function swapToElasticlunr(replaceInFileSync) {
- // Edit the config.toml file
- replaceInFileSync({
- files: configTomlPath,
- from: /search_library = ['|"]\w+['|"]/g,
- to: 'search_library = "elasticlunr"',
- });
- replaceInFileSync({
- files: configTomlPath,
- from: /online_indexformat = ['|"]\w+['|"]/g,
- to: 'online_indexformat = "elasticlunr_json"',
- });
- replaceInFileSync({
- files: configTomlPath,
- from: /index_format = ['|"]\w+['|"]/g,
- to: 'index_format = "elasticlunr_json"',
- });
-} \ No newline at end of file
diff --git a/static/js/search_stork.min.js b/static/js/search_stork.min.js
deleted file mode 100644
index 7e7c7df..0000000
--- a/static/js/search_stork.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function loadStork(){var e=document.querySelector("meta[name='base']").getAttribute("content");"/"==e.slice(-1)&&(e=e.slice(0,-1)),stork.initialize(e+"/stork.wasm").then(()=>{}).catch(e=>{}),stork.register("stork",e+"/stork.st")}(()=>{function r(e){var t=o[e];return void 0!==t||(t=o[e]={exports:{}},n[e].call(t.exports,t,t.exports,r)),t.exports}var n={214:(e,t,r)=>{function o(e){return s[e]}function d(){return n=null!==n&&n.buffer===p.memory.buffer?n:new Uint8Array(p.memory.buffer)}function h(n,r,t){if(void 0===t){let e=l.encode(n),t=r(e.length);return d().subarray(t,t+e.length).set(e),m=e.length,t}let o=n.length,s=r(o);var i=d();let a=0;for(;a<o;a++){let e=n.charCodeAt(a);if(127<e)break;i[s+a]=e}if(a!==o){0!==a&&(n=n.slice(a)),s=t(s,o,o=a+3*n.length);let e=d().subarray(s+a,s+o);a+=u(n,e).written}return m=a,s}function f(){return a=null!==a&&a.buffer===p.memory.buffer?a:new Int32Array(p.memory.buffer)}function g(e,t){return c.decode(d().subarray(e,e+t))}let p,s=(r.r(t),r.d(t,{default:()=>v,wasm_register_index:()=>function(e,t){try{var n=p.__wbindgen_add_to_stack_pointer(-16),r=h(e,p.__wbindgen_malloc,p.__wbindgen_realloc),o=m,s=(u=t,c=(0,p.__wbindgen_malloc)(+u.length),d().set(u,+c),m=u.length,c),i=m,a=(p.wasm_register_index(n,r,o,s,i),f()[n/4+0]),l=f()[n/4+1];return g(a,l)}finally{p.__wbindgen_add_to_stack_pointer(16),p.__wbindgen_free(a,l)}var u,c},wasm_search:()=>function(e,t){try{var n=p.__wbindgen_add_to_stack_pointer(-16),r=h(e,p.__wbindgen_malloc,p.__wbindgen_realloc),o=m,s=h(t,p.__wbindgen_malloc,p.__wbindgen_realloc),i=m,a=(p.wasm_search(n,r,o,s,i),f()[n/4+0]),l=f()[n/4+1];return g(a,l)}finally{p.__wbindgen_add_to_stack_pointer(16),p.__wbindgen_free(a,l)}},wasm_stork_version:()=>function(){try{var e=p.__wbindgen_add_to_stack_pointer(-16),t=(p.wasm_stork_version(e),f()[e/4+0]),n=f()[e/4+1];return g(t,n)}finally{p.__wbindgen_add_to_stack_pointer(16),p.__wbindgen_free(t,n)}}}),Array(32).fill(void 0)),i=(s.push(void 0,null,!0,!1),s.length),m=0,n=null,l=new TextEncoder("utf-8"),u="function"==typeof l.encodeInto?function(e,t){return l.encodeInto(e,t)}:function(e,t){var n=l.encode(e);return t.set(n),{read:e.length,written:n.length}},a=null,c=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),v=(c.decode(),async function e(t){void 0===t&&(t=new URL("stork_bg.wasm",function(){var e=r.p;let t="";return e&&~e.indexOf("://")||(t+=window.location.protocol+"//"+window.location.host),(t+=e||"/")+"node_modules/stork-search/stork.js"}()));var n={wbg:{}},{instance:t,module:n}=(n.wbg.__wbg_new_693216e109162396=function(){return e=Error(),i===s.length&&s.push(s.length+1),t=i,i=s[t],s[t]=e,t;var e,t},n.wbg.__wbg_stack_0ddaca5d1abfb52f=function(e,t){var t=h(o(t).stack,p.__wbindgen_malloc,p.__wbindgen_realloc),n=m;f()[e/4+1]=n,f()[e/4+0]=t},n.wbg.__wbg_error_09919627ac0992f5=function(e,t){p.__wbindgen_free(e,t)},n.wbg.__wbindgen_object_drop_ref=function(e){o(e),(e=e)<36||(s[e]=i,i=e)},await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t}var n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}(await(t="string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL?fetch(t):t),n));return p=t.exports,e.__wbindgen_wasm_module=n,p})},914:(e,l,t)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.calculateOverriddenConfig=l.defaultConfig=void 0;var u=t(445),c=t(466);l.defaultConfig={showProgress:!0,printIndexInfo:!1,showScores:!1,showCloseButton:!0,minimumQueryLength:3,forceOverwrite:!1,resultNoun:{singular:"file",plural:"files"},onQueryUpdate:void 0,onResultSelected:void 0,onResultsHidden:void 0,onInputCleared:void 0,transformResultUrl:function(e){return e}},l.calculateOverriddenConfig=function(e){var t,n=(0,c.difference)(Object.keys(e),Object.keys(l.defaultConfig));if(0<n.length)return t=(0,c.plural)(n.length,"key","keys"),n=JSON.stringify(n),new u.default("Invalid ".concat(t," in config object: ").concat(n));for(var r=Object.assign({},l.defaultConfig),o=0,s=Object.keys(l.defaultConfig);o<s.length;o++){var i=s[o],a=e[i];void 0!==a&&(r[i]=a)}return r}},227:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.existsBeyondContainerBounds=t.setText=t.clear=t.add=t.create=void 0,t.create=function(e,t){e=document.createElement(e);return t.classNames&&e.setAttribute("class",t.classNames.join(" ")),e},t.add=function(e,t,n){n.insertAdjacentElement(t,e)},t.clear=function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)},t.setText=function(e,t){t=document.createTextNode(t);e&&e.firstChild?e.replaceChild(t,e.firstChild):e&&e.appendChild(t)},t.existsBeyondContainerBounds=function(e,t){e=e.getBoundingClientRect(),t=t.getBoundingClientRect();return e.bottom>t.bottom||e.top<t.top}},934:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Entity=void 0;var r=n(139),o=n(771),s=n(214),i=n(445);function a(e,t,n){var r=this;this._state="initialized",this.downloadProgress=0,this.results=[],this.totalResultCount=0,this.eventListenerFunctions={},this.highlightedResult=0,this.resultsVisible=!1,this.hoverSelectEnabled=!0,this.setDownloadProgress=function(e){r.state="loading",r.downloadProgress=e,r.config.showProgress&&r.render()},this.name=e,this.url=t,this.config=n}Object.defineProperty(a.prototype,"state",{get:function(){return this._state},set:function(e){this._state=e,this.render()},enumerable:!1,configurable:!0}),a.prototype.getCurrentMessage=function(){var e;return this.domManager?(e=this.domManager.getQuery(),"error"===this.state?"Error! Check the browser console.":"ready"!=this.state?"Loading...":(null==e?void 0:e.length)<this.config.minimumQueryLength?"Filtering...":this.results?0===this.totalResultCount?"No ".concat(this.config.resultNoun.plural," found."):1===this.totalResultCount?"1 ".concat(this.config.resultNoun.singular," found."):"".concat(this.totalResultCount," ").concat(this.config.resultNoun.plural," found."):null):null},a.prototype.generateRenderConfig=function(){return{results:this.results,resultsVisible:!0,showScores:this.config.showScores,message:this.getCurrentMessage(),showProgress:this.config.showProgress,progress:this.downloadProgress,state:this.state}},a.prototype.render=function(){this.domManager&&this.domManager.render(this.generateRenderConfig())},a.prototype.registerIndex=function(r){var o=this;return new Promise(function(e,t){var n=JSON.parse((0,s.wasm_register_index)(o.name,r));n.error?t(new i.default(n.error)):(o.config.printIndexInfo,o.state="ready",e(n))})},a.prototype.attachToDom=function(){this.domManager=new o.EntityDom(this.name,this),this.render()},a.prototype.injestSearchData=function(e){var r=this,o=(this.results=e.results,this.totalResultCount=e.total_hit_count,this.highlightedResult=0,e.url_prefix||"");this.results.map(function(e){var t="",n=e.excerpts.map(function(e){return e.internal_annotations}).filter(function(e){return!!e})[0];n&&n[0]&&"string"==typeof(n=n[0]).a&&(t+=n.a),e.excerpts&&e.excerpts[0]&&e.excerpts[0].internal_annotations&&e.excerpts[0].internal_annotations[0]&&e.excerpts[0].internal_annotations[0].a&&"string"==typeof e.excerpts[0].internal_annotations[0].a&&(t=e.excerpts[0].internal_annotations[0].a),e.entry.url=r.config.transformResultUrl("".concat(o).concat(e.entry.url).concat(t))}),this.render()},a.prototype.getSanitizedResults=function(){var e=this.results;return e.map(function(e){delete e.title_highlight_ranges,e.excerpts.map(function(e){delete e.highlight_ranges,delete e.internal_annotations})}),e},a.prototype.setDownloadError=function(){this.state="error"},a.prototype.performSearch=function(e){if("ready"===this.state)if(e.length<this.config.minimumQueryLength)this.results=[],this.render();else try{var t=(0,r.resolveSearch)(this.name,e);t&&(this.injestSearchData(t),this.config.onQueryUpdate)&&this.config.onQueryUpdate(e,this.getSanitizedResults())}catch(e){}else this.render()},t.Entity=a},771:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EntityDom=void 0;var a=n(227),i=n(9),o={results:[],resultsVisible:!1,showScores:!1,message:null,showProgress:!1,progress:1,state:"ready"};function r(n,e){var r=this,e=(this.scrollAnchorPoint="end",this.entity=e,[{selector:'input[data-stork="'.concat(n,'"]'),elementName:"input"},{selector:'div[data-stork="'.concat(n,'-output"]'),elementName:"output"}].map(function(e){var t=document.querySelector(e.selector);if(t)return t;throw Error('Could not register search box "'.concat(n,'": ').concat(e.elementName," element not found. Make sure an element matches the query selector `").concat(e.selector,"`"))})),t=e[0];this.elements={input:t,output:e[1],list:(0,a.create)("ul",{classNames:["stork-results"]}),attribution:(0,a.create)("div",{classNames:["stork-attribution"]}),progress:(0,a.create)("div",{classNames:["stork-progress"]}),message:(0,a.create)("div",{classNames:["stork-message"]}),closeButton:(0,a.create)("button",{classNames:["stork-close-button"]})},this.elements.input.removeEventListener("input",this.entity.eventListenerFunctions.inputInputEvent),this.elements.input.removeEventListener("keydown",this.entity.eventListenerFunctions.inputKeydownEvent),this.entity.eventListenerFunctions={inputInputEvent:function(e){r.handleInputEvent(e)},inputKeydownEvent:function(e){r.handleKeyDownEvent(e)}},this.elements.input.addEventListener("input",this.entity.eventListenerFunctions.inputInputEvent),this.elements.input.addEventListener("keydown",this.entity.eventListenerFunctions.inputKeydownEvent),null!=(t=this.elements.list)&&t.addEventListener("mousemove",function(){r.hoverSelectEnabled=!0}),this.elements.attribution.innerHTML='Powered by <a href="https://stork-search.net">Stork</a>',this.elements.closeButton.innerHTML='\n<svg height="0.8em" viewBox="0 0 23 24" xmlns="http://www.w3.org/2000/svg">\n<g fill="none" fill-rule="evenodd" stroke-linecap="round">\n<g transform="translate(-700 -149)" stroke="currentcolor" stroke-width="4">\n<line id="a" x1="702.5" x2="720" y1="152.5" y2="170"/>\n<line transform="translate(711 161) rotate(-90) translate(-711 -161)" x1="702.5" x2="720" y1="152.5" y2="170"/>\n</g>\n</g>\n</svg>',this.entity.config.showProgress&&(0,a.add)(this.elements.progress,"afterend",this.elements.input),null!=(e=this.elements.closeButton)&&e.addEventListener("click",function(){r.elements.input.value="",r.elements.input.focus(),r.render(o);var e=[r.entity.config.onInputCleared,r.entity.config.onResultsHidden],t=e[0],e=e[1];t&&t(),e&&e()})}r.prototype.clearDom=function(){var e;(0,a.clear)(this.elements.output),(0,a.clear)(this.elements.list),null!=(e=this.elements.closeButton)&&e.remove(),this.elements.output.classList.remove("stork-output-visible")},r.prototype.render=function(r){var e,o=this,t=this.elements.input.value;if(this.clearDom(),(this.lastRenderState=r).showProgress&&((e=function(){switch(r.state){case"ready":case"error":return 1;case"initialized":case"loading":return.9*r.progress+.05}}())<1?(this.elements.progress.style.width="".concat(100*e,"%"),this.elements.progress.style.opacity="1"):(this.elements.progress.style.width="100%",this.elements.progress.style.opacity="0")),"error"===r.state&&this.elements.input.classList.add("stork-error"),0<this.getQuery().length&&r.resultsVisible&&(this.elements.output.classList.add("stork-output-visible"),(0,a.add)(this.elements.message,"beforeend",this.elements.output)),r.message&&(0,a.setText)(this.elements.message,r.message),0<(null==(e=r.results)?void 0:e.length)&&r.resultsVisible){(0,a.add)(this.elements.list,"beforeend",this.elements.output);for(var s=this,n=0;n<r.results.length;n++)!function(e){var t=r.results[e],n={selected:e===s.highlightedResult,showScores:r.showScores},t=(0,i.resultToListItem)(t,n);(0,a.add)(t,"beforeend",s.elements.list),t.addEventListener("mousemove",function(){o.hoverSelectEnabled&&e!==o.highlightedResult&&o.changeHighlightedResult({to:e,shouldScrollTo:!1})}),t.addEventListener("mouseleave",function(){o.hoverSelectEnabled&&e===o.highlightedResult&&o.changeHighlightedResult({to:-1,shouldScrollTo:!1})}),t.addEventListener("click",function(e){e.preventDefault(),o.selectResult()})}(n);(0,a.add)(this.elements.attribution,"beforeend",this.elements.output)}0<((null==t?void 0:t.length)||0)&&this.entity.config.showCloseButton&&(0,a.add)(this.elements.closeButton,"afterend",this.elements.input)},r.prototype.selectResult=function(){var e;null!=this.highlightedResult&&(e=this.entity.results[this.highlightedResult],this.entity.config.onResultSelected?Promise.resolve(this.entity.config.onResultSelected(this.getQuery(),e)).finally(function(){window.location.assign(e.entry.url)}):window.location.assign(e.entry.url))},r.prototype.changeHighlightedResult=function(e){var t=this.highlightedResult,n=Math.max(-1,Math.min(this.entity.results.length-1,e.to));this.highlightedResult=n,this.scrollAnchorPoint=(t||0)<n?"end":"start";for(var r=null,o=0;o<this.entity.results.length;o++){var s,i=null==(i=this.elements.list)?void 0:i.children[o];i&&(s="selected",o==n?(i.classList.add(s),r=i):i.classList.remove(s))}return e.shouldScrollTo&&(this.hoverSelectEnabled=!1,r)&&(0,a.existsBeyondContainerBounds)(r,this.elements.list)&&r.scrollIntoView({behavior:"smooth",block:this.scrollAnchorPoint,inline:"nearest"}),n},r.prototype.handleKeyDownEvent=function(e){switch(e.keyCode){case 40:var t;null==this.highlightedResult?this.changeHighlightedResult({to:0,shouldScrollTo:!0}):(t=Math.min(this.highlightedResult+1,this.entity.results.length-1),this.changeHighlightedResult({to:t,shouldScrollTo:!0}));break;case 38:null!=this.highlightedResult&&(t=Math.max(0,this.highlightedResult-1),this.changeHighlightedResult({to:t,shouldScrollTo:!0}));break;case 13:this.selectResult();break;case 27:var n;this.lastRenderState.resultsVisible?(this.render(o),(n=this.entity.config.onResultsHidden)&&n()):0<this.elements.input.value.length&&(this.elements.input.value="",this.render(o),n=this.entity.config.onInputCleared)&&n();break;default:return}},r.prototype.handleInputEvent=function(e){this.entity.performSearch(e.target.value)},r.prototype.getQuery=function(){return this.elements.input.value},t.EntityDom=r},129:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])!{}.hasOwnProperty.call(t,o)||(e[o]=t[o]);return e}).apply(this,arguments)},a=(Object.defineProperty(t,"__esModule",{value:!0}),t.debug=t.entityIsReady=t.attachToDom=t.register=void 0,n(934)),l=n(914),u=n(794),c=n(258),d=n(445),h={};t.register=function(o,s,i){return new Promise(function(t,n){var r,e=(0,l.calculateOverriddenConfig)(i);e instanceof d.default?n(e):(h[o]&&!e.forceOverwrite&&n(new d.default("You're registering an index named `".concat(o,"`, but that already exists. If this is expected, set forceOverwrite to true in your Javascript config to allow overwriting indexes."))),r=new a.Entity(o,s,e),h[o]=r,(0,u.loadIndexFromUrl)(s,{progress:function(e){r.setDownloadProgress(e)},load:function(e){(0,c.runAfterWasmLoaded)(function(){r.registerIndex(new Uint8Array(e)).then(t).catch(n)},function(){r.state="error"})},error:function(){r.setDownloadError(),n()}}))})},t.attachToDom=function(e){if(!h[e])throw Error("Index ".concat(e," has not been registered!"));h[e].attachToDom()},t.entityIsReady=function(e){return"ready"===(null==(e=h[e])?void 0:e.state)},t.debug=function(){return{entities:r({},h),entitiesCount:h.length}}},794:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadIndexFromUrl=void 0,t.loadIndexFromUrl=function(e,r){var t=new XMLHttpRequest;t.addEventListener("load",function(e){var t=e.target,n=t.status,t=t.response;0!==n?n<200||299<n?r.error():r.load(t):r.progress(e.loaded/e.total)}),t.addEventListener("error",function(){r.error()}),t.addEventListener("progress",function(e){r.progress(e.loaded/e.total)}),t.responseType="arraybuffer",t.open("GET",e),t.send()}},480:function(e,t,n){function o(e){return(0,l.loadWasm)(e=void 0===e?null:e).then(function(){})}function s(r,o,s){return void 0===s&&(s={}),new Promise(function(e,t){var n=(0,d.validateIndexParams)(r,o);n?t(n):(0,a.register)(r,o,s).then(e).catch(t)})}function i(e){try{(0,a.attachToDom)(e)}catch(e){throw new c.default(e.message)}}var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])!{}.hasOwnProperty.call(t,o)||(e[o]=t[o]);return e}).apply(this,arguments)},a=(Object.defineProperty(t,"__esModule",{value:!0}),t.debug=t.register=t.search=t.attach=t.downloadIndex=t.initialize=void 0,n(129)),l=n(258),u=n(139),c=n(445),d=n(34),h=n(214);t.initialize=o,t.downloadIndex=s,t.attach=i,t.register=function(e,t,n){void 0===n&&(n={});var r=o(),t=s(e,t,n);return i(e),Promise.all([r,t]).then()},t.search=function(e,t){if(!e||!t)throw new c.default("Make sure to call stork.search() with two arguments: the index name and the search query.");if((0,a.entityIsReady)(e))return(0,u.resolveSearch)(e,t);throw new c.default("Couldn't find index. Make sure the stork.downloadIndex() promise has resolved before calling stork.search().")},t.debug=function(){return r(r(r({},(0,l.debug)()),(0,a.debug)()),{jsStorkVersion:"1.5.0",wasmStorkVersion:h.wasm_stork_version})}},112:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.highlight=void 0,t.highlight=function(e,t){function n(e,t,n){return e.substr(0,t)+n+e.substr(t)}for(var r=0,o=0,s=t;o<s.length;o++){var i=s[o],a='<mark class="stork-highlight">',l="</mark>";e=n(e,i.beginning+r,a),e=n(e,i.end+(r+=30),l),r+=7}return e}},9:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resultToListItem=void 0;var r=n(112);t.resultToListItem=function(e,t){var n=document.createElement("template");return n.innerHTML='\n<li class="stork-result'.concat(t.selected?" selected":"",'">\n <a href="').concat(e.entry.url,'">\n <div class="stork-title">\n <p>').concat((0,r.highlight)(e.entry.title,e.title_highlight_ranges||[]),"</p>\n ").concat(t.showScores?"<code><b>".concat(e.score,"</b></code>"):"","\n </div>\n ").concat(0<e.excerpts.length?'<div class="stork-excerpt-container" />':"","\n ").concat(e.excerpts.map(function(e){return'<div class="stork-excerpt"><p>\n ...'.concat((0,r.highlight)(e.text,e.highlight_ranges||[]),"...\n </p>\n ").concat(t.showScores?"<code>".concat(e.score,"</code>"):"","\n </div>")}).join(""),"\n ").concat(0<e.excerpts.length?"</div>":"","\n </a>\n</li>"),n.content.firstElementChild}},139:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSearch=void 0;var o=n(214),s=n(445);t.resolveSearch=function(e,t){var n=null,r=null;try{r=JSON.parse(n=(0,o.wasm_search)(e,t))}catch(e){throw new s.default("Could not parse data from wasm_search. If you see this, please file a bug: https://jil.im/storkbug "+n)}if(!r)throw new s.default("Data was an empty object");if(r.error)throw new s.default("Could not perform search: the WASM binary failed to return search results.\n You might not be serving your search index properly.\n If you think this is an error, please file a bug: https://jil.im/storkbug\n \n The WASM binary came back with:\n ".concat(r.error));return r}},445:function(e,t){var r,n,o=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)!{}.hasOwnProperty.call(t,n)||(e[n]=t[n])}))(e,t)},function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+t+" is not a constructor or null");r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=(Object.defineProperty(t,"__esModule",{value:!0}),o(s,n=Error),s);function s(e){e=n.call(this,e)||this;return e.name="StorkError",e}t.default=o},466:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.plural=t.difference=t.htmlToElement=void 0,t.htmlToElement=function(e){var t=document.createElement("template");return e=e.trim(),t.innerHTML=e,t.content.firstChild},t.difference=function(e,t){var n=new Set(t);return Array.from(new Set(Array.from(new Set(e)).filter(function(e){return!n.has(e)})))},t.plural=function(e,t,n){return 1==e?t:n}},34:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateIndexParams=void 0;var r=n(445);t.validateIndexParams=function(e,t){return"string"!=typeof e?new r.default("Index registration name must be a string."):"string"!=typeof t?new r.default("URL must be a string."):null}},258:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.debug=t.loadWasm=t.runAfterWasmLoaded=void 0;var r=n(214),o=n(445),s=null,i=null,a=[],l=[],u=(t.loadWasm=function(e){var t;return i||(t=(e=void 0===e?null:e)||"https://files.stork-search.net/releases/v1.5.0/stork.wasm",s=t,e=(0,r.default)(t).then(function(){return u(),t}).catch(function(){throw c(),new o.default("Error while loading WASM at ".concat(t))}),i=e)},t.runAfterWasmLoaded=function(e,t){return i?(i.then(function(){return e()}).catch(function(){return t()}),i):(a.push(e),l.push(t),null)},function(){a.forEach(function(e){e()}),a=[]}),c=function(){l.forEach(function(e){e()}),l=[]};t.debug=function(){return{wasmSourceUrl:s,wasmLoadPromise:i,queueLength:a.length}}}},o={};r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("","return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>({}).hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.g.importScripts&&(e=r.g.location+"");var e,t=r.g.document;if(e||!t||(e=t.currentScript?t.currentScript.src:e)||(t=t.getElementsByTagName("script")).length&&(e=t[t.length-1].src),!e)throw Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e;t=r(480);stork=t})();var stork,loaded=!1;window.onload=function(){document.body.contains(document.goSearch)&&(document.goSearch.onsubmit=function(){return goSearchNow()}),document.getElementById("searchinput").onfocus=function(){loaded||(loadStork(),loaded=!0,document.body.contains(document.goSearch)&&(document.goSearch.onsubmit=function(){return goSearchNow()})),document.getElementById("searchinput").onfocus=""}}; \ No newline at end of file
diff --git a/static/js/stork.js b/static/js/stork.js
deleted file mode 100644
index b464ecd..0000000
--- a/static/js/stork.js
+++ /dev/null
@@ -1,2 +0,0 @@
-var stork;(()=>{"use strict";var e={214:(e,t,n)=>{let r;n.r(t),n.d(t,{default:()=>_,wasm_register_index:()=>v,wasm_search:()=>y,wasm_stork_version:()=>w});const o=new Array(32).fill(void 0);function s(e){return o[e]}o.push(void 0,null,!0,!1);let i=o.length;let a=0,l=null;function u(){return null!==l&&l.buffer===r.memory.buffer||(l=new Uint8Array(r.memory.buffer)),l}let c=new TextEncoder("utf-8");const d="function"==typeof c.encodeInto?function(e,t){return c.encodeInto(e,t)}:function(e,t){const n=c.encode(e);return t.set(n),{read:e.length,written:n.length}};function h(e,t,n){if(void 0===n){const n=c.encode(e),r=t(n.length);return u().subarray(r,r+n.length).set(n),a=n.length,r}let r=e.length,o=t(r);const s=u();let i=0;for(;i<r;i++){const t=e.charCodeAt(i);if(t>127)break;s[o+i]=t}if(i!==r){0!==i&&(e=e.slice(i)),o=n(o,r,r=i+3*e.length);const t=u().subarray(o+i,o+r);i+=d(e,t).written}return a=i,o}let f=null;function g(){return null!==f&&f.buffer===r.memory.buffer||(f=new Int32Array(r.memory.buffer)),f}let p=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});function m(e,t){return p.decode(u().subarray(e,e+t))}function v(e,t){try{const d=r.__wbindgen_add_to_stack_pointer(-16);var n=h(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=a,s=function(e,t){const n=t(1*e.length);return u().set(e,n/1),a=e.length,n}(t,r.__wbindgen_malloc),i=a;r.wasm_register_index(d,n,o,s,i);var l=g()[d/4+0],c=g()[d/4+1];return m(l,c)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(l,c)}}function y(e,t){try{const c=r.__wbindgen_add_to_stack_pointer(-16);var n=h(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=a,s=h(t,r.__wbindgen_malloc,r.__wbindgen_realloc),i=a;r.wasm_search(c,n,o,s,i);var l=g()[c/4+0],u=g()[c/4+1];return m(l,u)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(l,u)}}function w(){try{const n=r.__wbindgen_add_to_stack_pointer(-16);r.wasm_stork_version(n);var e=g()[n/4+0],t=g()[n/4+1];return m(e,t)}finally{r.__wbindgen_add_to_stack_pointer(16),r.__wbindgen_free(e,t)}}p.decode();const _=async function e(t){void 0===t&&(t=new URL("stork_bg.wasm",function(e){const t=n.p;let r="";return(!t||t.indexOf("://")<0)&&(r+=window.location.protocol+"//"+window.location.host),r+=t||"/",r+e}("node_modules/stork-search/stork.js")));const l={wbg:{}};l.wbg.__wbg_new_693216e109162396=function(){return function(e){i===o.length&&o.push(o.length+1);const t=i;return i=o[t],o[t]=e,t}(new Error)},l.wbg.__wbg_stack_0ddaca5d1abfb52f=function(e,t){var n=h(s(t).stack,r.__wbindgen_malloc,r.__wbindgen_realloc),o=a;g()[e/4+1]=o,g()[e/4+0]=n},l.wbg.__wbg_error_09919627ac0992f5=function(e,t){try{console.error(m(e,t))}finally{r.__wbindgen_free(e,t)}},l.wbg.__wbindgen_object_drop_ref=function(e){!function(e){const t=s(e);(function(e){e<36||(o[e]=i,i=e)})(e)}(e)},("string"==typeof t||"function"==typeof Request&&t instanceof Request||"function"==typeof URL&&t instanceof URL)&&(t=fetch(t));const{instance:u,module:c}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await t,l);return r=u.exports,e.__wbindgen_wasm_module=c,r}},914:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calculateOverriddenConfig=t.defaultConfig=void 0;var r=n(445),o=n(466);t.defaultConfig={showProgress:!0,printIndexInfo:!1,showScores:!1,showCloseButton:!0,minimumQueryLength:3,forceOverwrite:!1,resultNoun:{singular:"file",plural:"files"},onQueryUpdate:void 0,onResultSelected:void 0,onResultsHidden:void 0,onInputCleared:void 0,transformResultUrl:function(e){return e}},t.calculateOverriddenConfig=function(e){var n=(0,o.difference)(Object.keys(e),Object.keys(t.defaultConfig));if(n.length>0){var s=(0,o.plural)(n.length,"key","keys"),i=JSON.stringify(n);return new r.default("Invalid ".concat(s," in config object: ").concat(i))}for(var a=Object.assign({},t.defaultConfig),l=0,u=Object.keys(t.defaultConfig);l<u.length;l++){var c=u[l],d=e[c];void 0!==d&&(a[c]=d)}return a}},227:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.existsBeyondContainerBounds=t.setText=t.clear=t.add=t.create=void 0,t.create=function(e,t){var n=document.createElement(e);return t.classNames&&n.setAttribute("class",t.classNames.join(" ")),n},t.add=function(e,t,n){n.insertAdjacentElement(t,e)},t.clear=function(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)},t.setText=function(e,t){var n=document.createTextNode(t);e&&e.firstChild?e.replaceChild(n,e.firstChild):e&&e.appendChild(n)},t.existsBeyondContainerBounds=function(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return n.bottom>r.bottom||n.top<r.top}},934:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Entity=void 0;var r=n(139),o=n(771),s=n(214),i=n(445),a=function(){function e(e,t,n){var r=this;this._state="initialized",this.downloadProgress=0,this.results=[],this.totalResultCount=0,this.eventListenerFunctions={},this.highlightedResult=0,this.resultsVisible=!1,this.hoverSelectEnabled=!0,this.setDownloadProgress=function(e){r.state="loading",r.downloadProgress=e,r.config.showProgress&&r.render()},this.name=e,this.url=t,this.config=n}return Object.defineProperty(e.prototype,"state",{get:function(){return this._state},set:function(e){this._state=e,this.render()},enumerable:!1,configurable:!0}),e.prototype.getCurrentMessage=function(){if(!this.domManager)return null;var e=this.domManager.getQuery();return"error"===this.state?"Error! Check the browser console.":"ready"!=this.state?"Loading...":(null==e?void 0:e.length)<this.config.minimumQueryLength?"Filtering...":this.results?0===this.totalResultCount?"No ".concat(this.config.resultNoun.plural," found."):1===this.totalResultCount?"1 ".concat(this.config.resultNoun.singular," found."):"".concat(this.totalResultCount," ").concat(this.config.resultNoun.plural," found."):null},e.prototype.generateRenderConfig=function(){return{results:this.results,resultsVisible:!0,showScores:this.config.showScores,message:this.getCurrentMessage(),showProgress:this.config.showProgress,progress:this.downloadProgress,state:this.state}},e.prototype.render=function(){this.domManager&&this.domManager.render(this.generateRenderConfig())},e.prototype.registerIndex=function(e){var t=this;return new Promise((function(n,r){var o=JSON.parse((0,s.wasm_register_index)(t.name,e));o.error?r(new i.default(o.error)):(t.config.printIndexInfo&&console.log(o),t.state="ready",n(o))}))},e.prototype.attachToDom=function(){this.domManager=new o.EntityDom(this.name,this),this.render()},e.prototype.injestSearchData=function(e){var t=this;this.results=e.results,this.totalResultCount=e.total_hit_count,this.highlightedResult=0;var n=e.url_prefix||"";this.results.map((function(e){var r="",o=e.excerpts.map((function(e){return e.internal_annotations})).filter((function(e){return!!e}))[0];if(o&&o[0]){var s=o[0];"string"==typeof s.a&&(r+=s.a)}e.excerpts&&e.excerpts[0]&&e.excerpts[0].internal_annotations&&e.excerpts[0].internal_annotations[0]&&e.excerpts[0].internal_annotations[0].a&&"string"==typeof e.excerpts[0].internal_annotations[0].a&&(r=e.excerpts[0].internal_annotations[0].a),e.entry.url=t.config.transformResultUrl("".concat(n).concat(e.entry.url).concat(r))})),this.render()},e.prototype.getSanitizedResults=function(){var e=this.results;return e.map((function(e){delete e.title_highlight_ranges,e.excerpts.map((function(e){delete e.highlight_ranges,delete e.internal_annotations}))})),e},e.prototype.setDownloadError=function(){this.state="error"},e.prototype.performSearch=function(e){if("ready"===this.state){if(e.length<this.config.minimumQueryLength)return this.results=[],void this.render();try{var t=(0,r.resolveSearch)(this.name,e);if(!t)return;this.injestSearchData(t),this.config.onQueryUpdate&&this.config.onQueryUpdate(e,this.getSanitizedResults())}catch(e){console.error(e)}}else this.render()},e}();t.Entity=a},771:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EntityDom=void 0;var r=n(227),o=n(9),s={results:[],resultsVisible:!1,showScores:!1,message:null,showProgress:!1,progress:1,state:"ready"},i=function(){function e(e,t){var n,o,i=this;this.scrollAnchorPoint="end",this.entity=t;var a=[{selector:'input[data-stork="'.concat(e,'"]'),elementName:"input"},{selector:'div[data-stork="'.concat(e,'-output"]'),elementName:"output"}].map((function(t){var n=document.querySelector(t.selector);if(!n)throw new Error('Could not register search box "'.concat(e,'": ').concat(t.elementName," element not found. Make sure an element matches the query selector `").concat(t.selector,"`"));return n})),l=a[0],u=a[1];this.elements={input:l,output:u,list:(0,r.create)("ul",{classNames:["stork-results"]}),attribution:(0,r.create)("div",{classNames:["stork-attribution"]}),progress:(0,r.create)("div",{classNames:["stork-progress"]}),message:(0,r.create)("div",{classNames:["stork-message"]}),closeButton:(0,r.create)("button",{classNames:["stork-close-button"]})},this.elements.input.removeEventListener("input",this.entity.eventListenerFunctions.inputInputEvent),this.elements.input.removeEventListener("keydown",this.entity.eventListenerFunctions.inputKeydownEvent),this.entity.eventListenerFunctions={inputInputEvent:function(e){i.handleInputEvent(e)},inputKeydownEvent:function(e){i.handleKeyDownEvent(e)}},this.elements.input.addEventListener("input",this.entity.eventListenerFunctions.inputInputEvent),this.elements.input.addEventListener("keydown",this.entity.eventListenerFunctions.inputKeydownEvent),null===(n=this.elements.list)||void 0===n||n.addEventListener("mousemove",(function(){i.hoverSelectEnabled=!0})),this.elements.attribution.innerHTML='Powered by <a href="https://stork-search.net">Stork</a>',this.elements.closeButton.innerHTML='\n<svg height="0.8em" viewBox="0 0 23 24" xmlns="http://www.w3.org/2000/svg">\n<g fill="none" fill-rule="evenodd" stroke-linecap="round">\n<g transform="translate(-700 -149)" stroke="currentcolor" stroke-width="4">\n<line id="a" x1="702.5" x2="720" y1="152.5" y2="170"/>\n<line transform="translate(711 161) rotate(-90) translate(-711 -161)" x1="702.5" x2="720" y1="152.5" y2="170"/>\n</g>\n</g>\n</svg>',this.entity.config.showProgress&&(0,r.add)(this.elements.progress,"afterend",this.elements.input),null===(o=this.elements.closeButton)||void 0===o||o.addEventListener("click",(function(){i.elements.input.value="",i.elements.input.focus(),i.render(s);var e=[i.entity.config.onInputCleared,i.entity.config.onResultsHidden],t=e[0],n=e[1];t&&t(),n&&n()}))}return e.prototype.clearDom=function(){var e;(0,r.clear)(this.elements.output),(0,r.clear)(this.elements.list),null===(e=this.elements.closeButton)||void 0===e||e.remove(),this.elements.output.classList.remove("stork-output-visible")},e.prototype.render=function(e){var t,n=this,s=this.elements.input.value;if(this.clearDom(),this.lastRenderState=e,e.showProgress){var i=function(){switch(e.state){case"ready":case"error":return 1;case"initialized":case"loading":return.9*e.progress+.05}}();i<1?(this.elements.progress.style.width="".concat(100*i,"%"),this.elements.progress.style.opacity="1"):(this.elements.progress.style.width="100%",this.elements.progress.style.opacity="0")}if("error"===e.state&&this.elements.input.classList.add("stork-error"),this.getQuery().length>0&&e.resultsVisible&&(this.elements.output.classList.add("stork-output-visible"),(0,r.add)(this.elements.message,"beforeend",this.elements.output)),e.message&&(0,r.setText)(this.elements.message,e.message),(null===(t=e.results)||void 0===t?void 0:t.length)>0&&e.resultsVisible){(0,r.add)(this.elements.list,"beforeend",this.elements.output);for(var a=function(t){var s=e.results[t],i={selected:t===l.highlightedResult,showScores:e.showScores},a=(0,o.resultToListItem)(s,i);(0,r.add)(a,"beforeend",l.elements.list),a.addEventListener("mousemove",(function(){n.hoverSelectEnabled&&t!==n.highlightedResult&&n.changeHighlightedResult({to:t,shouldScrollTo:!1})})),a.addEventListener("mouseleave",(function(){n.hoverSelectEnabled&&t===n.highlightedResult&&n.changeHighlightedResult({to:-1,shouldScrollTo:!1})})),a.addEventListener("click",(function(e){e.preventDefault(),n.selectResult()}))},l=this,u=0;u<e.results.length;u++)a(u);(0,r.add)(this.elements.attribution,"beforeend",this.elements.output)}((null==s?void 0:s.length)||0)>0&&this.entity.config.showCloseButton&&(0,r.add)(this.elements.closeButton,"afterend",this.elements.input)},e.prototype.selectResult=function(){if(null!=this.highlightedResult){var e=this.entity.results[this.highlightedResult];this.entity.config.onResultSelected?Promise.resolve(this.entity.config.onResultSelected(this.getQuery(),e)).finally((function(){window.location.assign(e.entry.url)})):window.location.assign(e.entry.url)}},e.prototype.changeHighlightedResult=function(e){var t,n=this.highlightedResult,o=Math.max(-1,Math.min(this.entity.results.length-1,e.to));this.highlightedResult=o,this.scrollAnchorPoint=(n||0)<o?"end":"start";for(var s=null,i=0;i<this.entity.results.length;i++){var a=null===(t=this.elements.list)||void 0===t?void 0:t.children[i];if(a){var l="selected";i==o?(a.classList.add(l),s=a):a.classList.remove(l)}}return e.shouldScrollTo&&(this.hoverSelectEnabled=!1,s&&(0,r.existsBeyondContainerBounds)(s,this.elements.list)&&s.scrollIntoView({behavior:"smooth",block:this.scrollAnchorPoint,inline:"nearest"})),o},e.prototype.handleKeyDownEvent=function(e){switch(e.keyCode){case 40:if(null==this.highlightedResult)this.changeHighlightedResult({to:0,shouldScrollTo:!0});else{var t=Math.min(this.highlightedResult+1,this.entity.results.length-1);this.changeHighlightedResult({to:t,shouldScrollTo:!0})}break;case 38:null!=this.highlightedResult&&(t=Math.max(0,this.highlightedResult-1),this.changeHighlightedResult({to:t,shouldScrollTo:!0}));break;case 13:this.selectResult();break;case 27:if(this.lastRenderState.resultsVisible)this.render(s),(n=this.entity.config.onResultsHidden)&&n();else if(this.elements.input.value.length>0){var n;this.elements.input.value="",this.render(s),(n=this.entity.config.onInputCleared)&&n()}break;default:return}},e.prototype.handleInputEvent=function(e){this.entity.performSearch(e.target.value)},e.prototype.getQuery=function(){return this.elements.input.value},e}();t.EntityDom=i},129:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.debug=t.entityIsReady=t.attachToDom=t.register=void 0;var o=n(934),s=n(914),i=n(794),a=n(258),l=n(445),u={};t.register=function(e,t,n){return new Promise((function(r,c){var d=(0,s.calculateOverriddenConfig)(n);if(d instanceof l.default)c(d);else{u[e]&&!d.forceOverwrite&&c(new l.default("You're registering an index named `".concat(e,"`, but that already exists. If this is expected, set forceOverwrite to true in your Javascript config to allow overwriting indexes.")));var h=new o.Entity(e,t,d);u[e]=h,(0,i.loadIndexFromUrl)(t,{progress:function(e){h.setDownloadProgress(e)},load:function(e){(0,a.runAfterWasmLoaded)((function(){h.registerIndex(new Uint8Array(e)).then(r).catch(c)}),(function(){h.state="error"}))},error:function(){h.setDownloadError(),c()}})}}))},t.attachToDom=function(e){if(!u[e])throw new Error("Index ".concat(e," has not been registered!"));u[e].attachToDom()},t.entityIsReady=function(e){var t;return"ready"===(null===(t=u[e])||void 0===t?void 0:t.state)},t.debug=function(){return{entities:r({},u),entitiesCount:u.length}}},794:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.loadIndexFromUrl=void 0,t.loadIndexFromUrl=function(e,t){var n=new XMLHttpRequest;n.addEventListener("load",(function(e){var n=e.target,r=n.status,o=n.response;0!==r?r<200||r>299?t.error():t.load(o):t.progress(e.loaded/e.total)})),n.addEventListener("error",(function(){t.error()})),n.addEventListener("progress",(function(e){t.progress(e.loaded/e.total)})),n.responseType="arraybuffer",n.open("GET",e),n.send()}},480:function(e,t,n){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.debug=t.register=t.search=t.attach=t.downloadIndex=t.initialize=void 0;var o=n(129),s=n(258),i=n(139),a=n(445),l=n(34),u=n(214);function c(e){return void 0===e&&(e=null),(0,s.loadWasm)(e).then((function(){}))}function d(e,t,n){return void 0===n&&(n={}),new Promise((function(r,s){var i=(0,l.validateIndexParams)(e,t);i?s(i):(0,o.register)(e,t,n).then(r).catch(s)}))}function h(e){try{(0,o.attachToDom)(e)}catch(e){throw new a.default(e.message)}}t.initialize=c,t.downloadIndex=d,t.attach=h,t.register=function(e,t,n){void 0===n&&(n={});var r=c(),o=d(e,t,n);return h(e),Promise.all([r,o]).then()},t.search=function(e,t){if(!e||!t)throw new a.default("Make sure to call stork.search() with two arguments: the index name and the search query.");if(!(0,o.entityIsReady)(e))throw new a.default("Couldn't find index. Make sure the stork.downloadIndex() promise has resolved before calling stork.search().");return(0,i.resolveSearch)(e,t)},t.debug=function(){return r(r(r({},(0,s.debug)()),(0,o.debug)()),{jsStorkVersion:"1.5.0",wasmStorkVersion:u.wasm_stork_version})}},112:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.highlight=void 0,t.highlight=function(e,t){function n(e,t,n){return e.substr(0,t)+n+e.substr(t)}for(var r=0,o=0,s=t;o<s.length;o++){var i=s[o],a='<mark class="stork-highlight">',l="</mark>";e=n(e,i.beginning+r,a),r+=a.length,e=n(e,i.end+r,l),r+=l.length}return e}},9:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resultToListItem=void 0;var r=n(112);t.resultToListItem=function(e,t){var n=document.createElement("template");return n.innerHTML='\n<li class="stork-result'.concat(t.selected?" selected":"",'">\n <a href="').concat(e.entry.url,'">\n <div class="stork-title">\n <p>').concat((0,r.highlight)(e.entry.title,e.title_highlight_ranges||[]),"</p>\n ").concat(t.showScores?"<code><b>".concat(e.score,"</b></code>"):"","\n </div>\n ").concat(e.excerpts.length>0?'<div class="stork-excerpt-container" />':"","\n ").concat(e.excerpts.map((function(e){return'<div class="stork-excerpt"><p>\n ...'.concat((0,r.highlight)(e.text,e.highlight_ranges||[]),"...\n </p>\n ").concat(t.showScores?"<code>".concat(e.score,"</code>"):"","\n </div>")})).join(""),"\n ").concat(e.excerpts.length>0?"</div>":"","\n </a>\n</li>"),n.content.firstElementChild}},139:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSearch=void 0;var r=n(214),o=n(445);t.resolveSearch=function(e,t){var n=null,s=null;try{n=(0,r.wasm_search)(e,t),s=JSON.parse(n)}catch(e){throw new o.default("Could not parse data from wasm_search. If you see this, please file a bug: https://jil.im/storkbug "+n)}if(!s)throw new o.default("Data was an empty object");if(s.error)throw new o.default("Could not perform search: the WASM binary failed to return search results.\n You might not be serving your search index properly.\n If you think this is an error, please file a bug: https://jil.im/storkbug\n \n The WASM binary came back with:\n ".concat(s.error));return s}},445:function(e,t){var n,r=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t){var n=e.call(this,t)||this;return n.name="StorkError",n}return r(t,e),t}(Error);t.default=o},466:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.plural=t.difference=t.htmlToElement=void 0,t.htmlToElement=function(e){var t=document.createElement("template");return e=e.trim(),t.innerHTML=e,t.content.firstChild},t.difference=function(e,t){var n=new Set(e),r=new Set(t),o=new Set(Array.from(n).filter((function(e){return!r.has(e)})));return Array.from(o)},t.plural=function(e,t,n){return 1==e?t:n}},34:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateIndexParams=void 0;var r=n(445);t.validateIndexParams=function(e,t){return"string"!=typeof e?new r.default("Index registration name must be a string."):"string"!=typeof t?new r.default("URL must be a string."):null}},258:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.debug=t.loadWasm=t.runAfterWasmLoaded=void 0;var r=n(214),o=n(445),s="https://files.stork-search.net/releases/v".concat("1.5.0","/stork.wasm"),i=null,a=null,l=[],u=[];t.loadWasm=function(e){if(void 0===e&&(e=null),a)return a;var t=e||s;i=t;var n=(0,r.default)(t).then((function(){return c(),t})).catch((function(){throw d(),new o.default("Error while loading WASM at ".concat(t))}));return a=n,n},t.runAfterWasmLoaded=function(e,t){return a?(a.then((function(){return e()})).catch((function(){return t()})),a):(l.push(e),u.push(t),null)};var c=function(){l.forEach((function(e){e()})),l=[]},d=function(){u.forEach((function(e){e()})),u=[]};t.debug=function(){return{wasmSourceUrl:i,wasmLoadPromise:a,queueLength:l.length}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r].call(s.exports,s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})();var r=n(480);stork=r})();
-//# sourceMappingURL=stork.js.map \ No newline at end of file
diff --git a/static/js/stork_config.js b/static/js/stork_config.js
deleted file mode 100644
index 3c589c2..0000000
--- a/static/js/stork_config.js
+++ /dev/null
@@ -1,25 +0,0 @@
-function loadStork() {
- var baseUrl = document.querySelector("meta[name='base']").getAttribute("content");
- if (baseUrl.slice(-1) == "/") {
- baseUrl = baseUrl.slice(0, -1);
- }
- stork.initialize(baseUrl + "/stork.wasm").then(() => {
- console.log("Finished downloading WASM");
- })
- .catch(e => {
- console.error(e);
- }); // download WASM
- stork.register("stork",baseUrl + "/stork.st");
-}
-var loaded = false;
-window.onload = function() {
- document.body.contains(document.goSearch) && (document.goSearch.onsubmit = function() { return goSearchNow() })
- document.getElementById('searchinput').onfocus = function() {
- if (!loaded) {
- loadStork();
- loaded = true;
- document.body.contains(document.goSearch) && (document.goSearch.onsubmit = function() { return goSearchNow() })
- }
- document.getElementById('searchinput').onfocus = '';
- }
-};
diff --git a/static/sw.js b/static/sw.js
index 90d58f1..e955926 100644
--- a/static/sw.js
+++ b/static/sw.js
@@ -5,7 +5,7 @@ class Pwa {
const Version = new URL(location).searchParams.get("v");
this.CACHE_VERSION = Version;
//this.BASE_CACHE_FILES=['/js/theme.min.js','/js/theme_light.min.js','/abridge.css','/js/abridge.min.js','/','/404.html','/offline/','/manifest.json'];
- this.BASE_CACHE_FILES = ['/404.html','/_headers','/abridge.css','/android-chrome-192x192.png','/android-chrome-512x512.png','/apple-touch-icon.png','/atom.xml','/banner.png','/browserconfig.xml','/elasticlunr.min.js','/favicon-16x16.png','/favicon-32x32.png','/favicon.ico','/favicon.svg','/','/katex.min.css','/m1024.png','/m128.png','/m192.png','/m384.png','/m48.png','/m512.png','/m72.png','/m96.png','/manifest.json','/manifest.min.json','/mstile-150x150.png','/nojs.css','/robots.txt','/safari-pinned-tab.svg','/search_index.en.json','/search_index.es.json','/search_index.fr.json','/sitemap.xml','/about/','/archive/','/blog/','/contact/','/es/atom.xml','/es/','/fonts/KaTeX_AMS-Regular.woff2','/fonts/KaTeX_Caligraphic-Bold.woff2','/fonts/KaTeX_Caligraphic-Regular.woff2','/fonts/KaTeX_Fraktur-Bold.woff2','/fonts/KaTeX_Fraktur-Regular.woff2','/fonts/KaTeX_Main-Bold.woff2','/fonts/KaTeX_Main-BoldItalic.woff2','/fonts/KaTeX_Main-Italic.woff2','/fonts/KaTeX_Main-Regular.woff2','/fonts/KaTeX_Math-BoldItalic.woff2','/fonts/KaTeX_Math-Italic.woff2','/fonts/KaTeX_SansSerif-Bold.woff2','/fonts/KaTeX_SansSerif-Italic.woff2','/fonts/KaTeX_SansSerif-Regular.woff2','/fonts/KaTeX_Script-Regular.woff2','/fonts/KaTeX_Size1-Regular.woff2','/fonts/KaTeX_Size2-Regular.woff2','/fonts/KaTeX_Size3-Regular.woff2','/fonts/KaTeX_Size4-Regular.woff2','/fonts/KaTeX_Typewriter-Regular.woff2','/fonts/Roboto-Bold.woff2','/fonts/Roboto-Italic.woff2','/fonts/Roboto-Mono-Italic.woff2','/fonts/Roboto-Mono.woff2','/fonts/Roboto.woff2','/fr/atom.xml','/fr/','/images/ferris-gesture.svg','/images/ferris.svg','/js/abridge.min.js','/js/abridge_nopwa.min.js','/js/abridge_nosearch.min.js','/js/abridge_nosearch_nopwa.min.js','/js/codecopy.js','/js/elasticlunr.min.js','/js/email.js','/js/katex-auto-render.min.js','/js/katex.min.js','/js/katexbundle.min.js','/js/katexbundle.min.old.js','/js/katexoptions.js','/js/lunr.da.js','/js/lunr.da.min.js','/js/lunr.de.js','/js/lunr.de.min.js','/js/lunr.du.js','/js/lunr.du.min.js','/js/lunr.es.js','/js/lunr.es.min.js','/js/lunr.fi.js','/js/lunr.fi.min.js','/js/lunr.fr.js','/js/lunr.fr.min.js','/js/lunr.hu.js','/js/lunr.hu.min.js','/js/lunr.it.js','/js/lunr.it.min.js','/js/lunr.jp.js','/js/lunr.jp.min.js','/js/lunr.no.js','/js/lunr.no.min.js','/js/lunr.pt.js','/js/lunr.pt.min.js','/js/lunr.ro.js','/js/lunr.ro.min.js','/js/lunr.ru.js','/js/lunr.ru.min.js','/js/lunr.stemmer.support.js','/js/lunr.stemmer.support.min.js','/js/lunr.sv.js','/js/lunr.sv.min.js','/js/lunr.tr.js','/js/lunr.tr.min.js','/js/lunr.zh.js','/js/lunr.zh.min.js','/js/mathtex-script-type.min.js','/js/pagefind-entry.json','/js/pagefind-highlight.js','/js/pagefind-modular-ui.css','/js/pagefind-modular-ui.js','/js/pagefind-ui.css','/js/pagefind-ui.js','/js/pagefind.index.js','/js/pagefind.js','/js/pagefind.search.js','/js/prestyle.js','/js/search.js','/js/searchChange.js','/js/search_elasticlunr.min.js','/js/search_elasticlunr_jindex.min.js','/js/search_stork.min.js','/js/search_tinysearch.min.js','/js/searchjava.js','/js/searchjavaugly.js','/js/stork.js','/js/stork_config.js','/js/sw_load.js','/js/sw_load.min.js','/js/theme.js','/js/theme.min.js','/js/theme_button.js','/js/theme_light.js','/js/theme_light.min.js','/js/tinysearch.js','/js/wasm.en.pagefind','/js/wasm.es.pagefind','/js/wasm.fr.pagefind','/js/wasm.unknown.pagefind','/offline/','/overview-abridge/','/overview-abridge/lighthouse.png','/overview-code-blocks/','/overview-images/corro.svg','/overview-images/ferris-gesture.png','/overview-images/ferris-gesture.svg','/overview-images/ferris-happy.svg','/overview-images/ferris.svg','/overview-images/','/overview-markdown-and-style/','/overview-math/','/overview-rich-content/','/overview-rich-content/over9000-400.avif','/overview-rich-content/over9000-640.avif','/overview-rich-content/over9000-640.webp','/overview-rich-content/over9000-960.avif','/overview-rich-content/over9000.mp3','/overview-rich-content/over9000.ogg','/overview-rich-content/over9000_av1.mp4','/overview-rich-content/over9000_vp9.webm','/overview-showdata/','/privacy/','/tags/','/es/archive/','/es/blog/','/es/tags/','/fr/about/','/fr/archive/','/fr/blog/','/fr/contact/','/fr/offline/','/fr/overview-abridge/','/fr/overview-abridge/lighthouse.png','/fr/overview-code-blocks/','/fr/overview-images/corro.svg','/fr/overview-images/ferris-gesture.png','/fr/overview-images/ferris-gesture.svg','/fr/overview-images/ferris-happy.svg','/fr/overview-images/ferris.svg','/fr/overview-images/','/fr/overview-markdown-and-style/','/fr/overview-math/','/fr/overview-rich-content/','/fr/overview-rich-content/over9000-400.avif','/fr/overview-rich-content/over9000-640.avif','/fr/overview-rich-content/over9000-640.webp','/fr/overview-rich-content/over9000-960.avif','/fr/overview-rich-content/over9000.mp3','/fr/overview-rich-content/over9000.ogg','/fr/overview-rich-content/over9000_av1.mp4','/fr/overview-rich-content/over9000_vp9.webm','/fr/overview-showdata/','/fr/privacy/','/fr/tags/','/overview-images/img/ferris-gesture.svg','/overview-images/img/ferris.svg','/page/1/','/page/2/','/page/3/','/page/4/','/tags/audio/atom.xml','/tags/audio/','/tags/config/atom.xml','/tags/config/','/tags/data/atom.xml','/tags/data/','/tags/features/atom.xml','/tags/features/','/tags/images/atom.xml','/tags/images/','/tags/markdown/atom.xml','/tags/markdown/','/tags/mathematics/atom.xml','/tags/mathematics/','/tags/shortcodes/atom.xml','/tags/shortcodes/','/tags/video/atom.xml','/tags/video/','/video-streaming-sites/overview-embed-streamable/','/video-streaming-sites/overview-embed-vimeo/','/video-streaming-sites/overview-embed-youtube/','/blog/page/1/','/es/page/1/','/es/tags/features/atom.xml','/es/tags/features/','/es/tags/shortcodes/atom.xml','/es/tags/shortcodes/','/es/tags/video/atom.xml','/es/tags/video/','/es/video-streaming-sites/overview-embed-streamable/','/fr/overview-images/img/ferris-gesture.svg','/fr/overview-images/img/ferris.svg','/fr/page/1/','/fr/page/2/','/fr/page/3/','/fr/page/4/','/fr/tags/audio/atom.xml','/fr/tags/audio/','/fr/tags/config/atom.xml','/fr/tags/config/','/fr/tags/data/atom.xml','/fr/tags/data/','/fr/tags/features/atom.xml','/fr/tags/features/','/fr/tags/images/atom.xml','/fr/tags/images/','/fr/tags/markdown/atom.xml','/fr/tags/markdown/','/fr/tags/mathematics/atom.xml','/fr/tags/mathematics/','/fr/tags/shortcodes/atom.xml','/fr/tags/shortcodes/','/fr/tags/video/atom.xml','/fr/tags/video/','/fr/video-streaming-sites/overview-embed-streamable/','/fr/video-streaming-sites/overview-embed-vimeo/','/fr/video-streaming-sites/overview-embed-youtube/','/es/blog/page/1/','/fr/blog/page/1/'];
+ this.BASE_CACHE_FILES = ['/404.html','/_headers','/abridge.css','/android-chrome-192x192.png','/android-chrome-512x512.png','/apple-touch-icon.png','/atom.xml','/banner.png','/browserconfig.xml','/demo.html','/elasticlunr.min.js','/favicon-16x16.png','/favicon-32x32.png','/favicon.ico','/favicon.svg','/','/katex.min.css','/m1024.png','/m128.png','/m192.png','/m384.png','/m48.png','/m512.png','/m72.png','/m96.png','/manifest.json','/manifest.min.json','/mstile-150x150.png','/nojs.css','/package.json','/robots.txt','/safari-pinned-tab.svg','/search_index.en.json','/search_index.es.json','/search_index.fr.json','/search_index.pt.json','/sitemap.xml','/tinysearch_engine.d.ts','/tinysearch_engine.js','/tinysearch_engine_bg.wasm','/tinysearch_engine_bg.wasm.d.ts','/about/','/archive/','/blog/','/contact/','/es/atom.xml','/es/','/fonts/KaTeX_AMS-Regular.woff2','/fonts/KaTeX_Caligraphic-Bold.woff2','/fonts/KaTeX_Caligraphic-Regular.woff2','/fonts/KaTeX_Fraktur-Bold.woff2','/fonts/KaTeX_Fraktur-Regular.woff2','/fonts/KaTeX_Main-Bold.woff2','/fonts/KaTeX_Main-BoldItalic.woff2','/fonts/KaTeX_Main-Italic.woff2','/fonts/KaTeX_Main-Regular.woff2','/fonts/KaTeX_Math-BoldItalic.woff2','/fonts/KaTeX_Math-Italic.woff2','/fonts/KaTeX_SansSerif-Bold.woff2','/fonts/KaTeX_SansSerif-Italic.woff2','/fonts/KaTeX_SansSerif-Regular.woff2','/fonts/KaTeX_Script-Regular.woff2','/fonts/KaTeX_Size1-Regular.woff2','/fonts/KaTeX_Size2-Regular.woff2','/fonts/KaTeX_Size3-Regular.woff2','/fonts/KaTeX_Size4-Regular.woff2','/fonts/KaTeX_Typewriter-Regular.woff2','/fonts/Roboto-Bold.woff2','/fonts/Roboto-Italic.woff2','/fonts/Roboto-Mono-Italic.woff2','/fonts/Roboto-Mono.woff2','/fonts/Roboto.woff2','/fr/atom.xml','/fr/','/images/ferris-gesture.svg','/images/ferris.svg','/js/abridge.min.js','/js/abridge_nopwa.min.js','/js/abridge_nosearch.min.js','/js/abridge_nosearch_nopwa.min.js','/js/codecopy.js','/js/elasticlunr.min.js','/js/email.js','/js/katex-auto-render.min.js','/js/katex.min.js','/js/katexbundle.min.js','/js/katexbundle.min.old.js','/js/katexoptions.js','/js/lunr.da.js','/js/lunr.da.min.js','/js/lunr.de.js','/js/lunr.de.min.js','/js/lunr.du.js','/js/lunr.du.min.js','/js/lunr.es.js','/js/lunr.es.min.js','/js/lunr.fi.js','/js/lunr.fi.min.js','/js/lunr.fr.js','/js/lunr.fr.min.js','/js/lunr.hu.js','/js/lunr.hu.min.js','/js/lunr.it.js','/js/lunr.it.min.js','/js/lunr.jp.js','/js/lunr.jp.min.js','/js/lunr.no.js','/js/lunr.no.min.js','/js/lunr.pt.js','/js/lunr.pt.min.js','/js/lunr.ro.js','/js/lunr.ro.min.js','/js/lunr.ru.js','/js/lunr.ru.min.js','/js/lunr.stemmer.support.js','/js/lunr.stemmer.support.min.js','/js/lunr.sv.js','/js/lunr.sv.min.js','/js/lunr.tr.js','/js/lunr.tr.min.js','/js/lunr.zh.js','/js/lunr.zh.min.js','/js/mathtex-script-type.min.js','/js/pagefind-entry.json','/js/pagefind-highlight.js','/js/pagefind-modular-ui.css','/js/pagefind-modular-ui.js','/js/pagefind-ui.css','/js/pagefind-ui.js','/js/pagefind.en_9a3bf9aefa.pf_meta','/js/pagefind.es_f4a7172a38.pf_meta','/js/pagefind.fr_6374b78f36.pf_meta','/js/pagefind.index.cjs','/js/pagefind.js','/js/pagefind.search.js','/js/prestyle.js','/js/search.js','/js/search_elasticlunr.min.js','/js/search_elasticlunr_jindex.min.js','/js/search_tinysearch.min.js','/js/searchjava.js','/js/searchjavaugly.js','/js/sw_load.js','/js/sw_load.min.js','/js/theme.js','/js/theme.min.js','/js/theme_button.js','/js/theme_light.js','/js/theme_light.min.js','/js/tinysearch.js','/js/wasm.en.pagefind','/js/wasm.es.pagefind','/js/wasm.fr.pagefind','/js/wasm.unknown.pagefind','/offline/','/overview-abridge/','/overview-abridge/lighthouse.png','/overview-code-blocks/','/overview-images/corro.svg','/overview-images/ferris-gesture.png','/overview-images/ferris-gesture.svg','/overview-images/ferris-happy.svg','/overview-images/ferris.svg','/overview-images/','/overview-markdown-and-style/','/overview-math/','/overview-rich-content/','/overview-rich-content/over9000-400.avif','/overview-rich-content/over9000-640.avif','/overview-rich-content/over9000-640.webp','/overview-rich-content/over9000-960.avif','/overview-rich-content/over9000.mp3','/overview-rich-content/over9000.ogg','/overview-rich-content/over9000_av1.mp4','/overview-rich-content/over9000_vp9.webm','/overview-showdata/','/privacy/','/pt/','/tags/','/es/archive/','/es/blog/','/es/tags/','/fr/about/','/fr/archive/','/fr/blog/','/fr/contact/','/fr/offline/','/fr/overview-code-blocks/','/fr/overview-images/corro.svg','/fr/overview-images/ferris-gesture.png','/fr/overview-images/ferris-gesture.svg','/fr/overview-images/ferris-happy.svg','/fr/overview-images/ferris.svg','/fr/overview-images/','/fr/overview-markdown-and-style/','/fr/overview-math/','/fr/overview-rich-content/','/fr/overview-rich-content/over9000-400.avif','/fr/overview-rich-content/over9000-640.avif','/fr/overview-rich-content/over9000-640.webp','/fr/overview-rich-content/over9000-960.avif','/fr/overview-rich-content/over9000.mp3','/fr/overview-rich-content/over9000.ogg','/fr/overview-rich-content/over9000_av1.mp4','/fr/overview-rich-content/over9000_vp9.webm','/fr/overview-showdata/','/fr/privacy/','/fr/tags/','/js/fragment/en_13419a6.pf_fragment','/js/fragment/en_2ac01ba.pf_fragment','/js/fragment/en_2d5f183.pf_fragment','/js/fragment/en_2e4fad3.pf_fragment','/js/fragment/en_5f16a37.pf_fragment','/js/fragment/en_7897259.pf_fragment','/js/fragment/en_8caec6c.pf_fragment','/js/fragment/en_8edb393.pf_fragment','/js/fragment/en_8f525ab.pf_fragment','/js/fragment/en_addec89.pf_fragment','/js/fragment/en_c821f77.pf_fragment','/js/fragment/en_eb58f87.pf_fragment','/js/fragment/en_f4821f1.pf_fragment','/js/fragment/en_f93465d.pf_fragment','/js/fragment/en_f96e4a8.pf_fragment','/js/fragment/es_3ec1224.pf_fragment','/js/fragment/es_591c668.pf_fragment','/js/fragment/fr_286d56a.pf_fragment','/js/fragment/fr_689c2d9.pf_fragment','/js/fragment/fr_7263c1f.pf_fragment','/js/fragment/fr_8418aed.pf_fragment','/js/fragment/fr_84444d8.pf_fragment','/js/fragment/fr_85d6df3.pf_fragment','/js/fragment/fr_8c1bc26.pf_fragment','/js/fragment/fr_8d4726b.pf_fragment','/js/fragment/fr_ba21b65.pf_fragment','/js/fragment/fr_f98357a.pf_fragment','/js/index/en_43498ed.pf_index','/js/index/es_29a1d7e.pf_index','/js/index/fr_b717c97.pf_index','/overview-images/img/ferris-gesture.svg','/overview-images/img/ferris.svg','/page/1/','/page/2/','/page/3/','/page/4/','/tags/audio/atom.xml','/tags/audio/','/tags/config/atom.xml','/tags/config/','/tags/data/atom.xml','/tags/data/','/tags/features/atom.xml','/tags/features/','/tags/images/atom.xml','/tags/images/','/tags/markdown/atom.xml','/tags/markdown/','/tags/mathematics/atom.xml','/tags/mathematics/','/tags/shortcodes/atom.xml','/tags/shortcodes/','/tags/video/atom.xml','/tags/video/','/video-streaming-sites/overview-embed-streamable/','/video-streaming-sites/overview-embed-vimeo/','/video-streaming-sites/overview-embed-youtube/','/blog/page/1/','/es/page/1/','/es/tags/features/atom.xml','/es/tags/features/','/es/tags/shortcodes/atom.xml','/es/tags/shortcodes/','/es/tags/video/atom.xml','/es/tags/video/','/es/video-streaming-sites/overview-embed-streamable/','/fr/overview-images/img/ferris-gesture.svg','/fr/overview-images/img/ferris.svg','/fr/page/1/','/fr/page/2/','/fr/page/3/','/fr/tags/audio/atom.xml','/fr/tags/audio/','/fr/tags/data/atom.xml','/fr/tags/data/','/fr/tags/features/atom.xml','/fr/tags/features/','/fr/tags/images/atom.xml','/fr/tags/images/','/fr/tags/markdown/atom.xml','/fr/tags/markdown/','/fr/tags/mathematics/atom.xml','/fr/tags/mathematics/','/fr/tags/shortcodes/atom.xml','/fr/tags/shortcodes/','/fr/tags/video/atom.xml','/fr/tags/video/','/fr/video-streaming-sites/overview-embed-streamable/','/fr/video-streaming-sites/overview-embed-vimeo/','/fr/video-streaming-sites/overview-embed-youtube/','/pt/page/1/','/es/blog/page/1/','/fr/blog/page/1/'];
this.host = `${self.location.protocol}//${self.location.host}`;
console.info(`Host: ${this.host}`);
this.OFFLINE_PAGE = '/offline/';
diff --git a/static/sw.min.js b/static/sw.min.js
index 3d797e4..7b7b2df 100644
--- a/static/sw.min.js
+++ b/static/sw.min.js
@@ -1 +1 @@
-class Pwa{constructor(e){this.scope=e;var s=new URL(location).searchParams.get("v");this.CACHE_VERSION=s,this.BASE_CACHE_FILES=["/404.html","/_headers","/abridge.css","/android-chrome-192x192.png","/android-chrome-512x512.png","/apple-touch-icon.png","/atom.xml","/banner.png","/browserconfig.xml","/elasticlunr.min.js","/favicon-16x16.png","/favicon-32x32.png","/favicon.ico","/favicon.svg","/","/katex.min.css","/m1024.png","/m128.png","/m192.png","/m384.png","/m48.png","/m512.png","/m72.png","/m96.png","/manifest.json","/manifest.min.json","/mstile-150x150.png","/nojs.css","/robots.txt","/safari-pinned-tab.svg","/search_index.en.json","/search_index.es.json","/search_index.fr.json","/sitemap.xml","/about/","/archive/","/blog/","/contact/","/es/atom.xml","/es/","/fonts/KaTeX_AMS-Regular.woff2","/fonts/KaTeX_Caligraphic-Bold.woff2","/fonts/KaTeX_Caligraphic-Regular.woff2","/fonts/KaTeX_Fraktur-Bold.woff2","/fonts/KaTeX_Fraktur-Regular.woff2","/fonts/KaTeX_Main-Bold.woff2","/fonts/KaTeX_Main-BoldItalic.woff2","/fonts/KaTeX_Main-Italic.woff2","/fonts/KaTeX_Main-Regular.woff2","/fonts/KaTeX_Math-BoldItalic.woff2","/fonts/KaTeX_Math-Italic.woff2","/fonts/KaTeX_SansSerif-Bold.woff2","/fonts/KaTeX_SansSerif-Italic.woff2","/fonts/KaTeX_SansSerif-Regular.woff2","/fonts/KaTeX_Script-Regular.woff2","/fonts/KaTeX_Size1-Regular.woff2","/fonts/KaTeX_Size2-Regular.woff2","/fonts/KaTeX_Size3-Regular.woff2","/fonts/KaTeX_Size4-Regular.woff2","/fonts/KaTeX_Typewriter-Regular.woff2","/fonts/Roboto-Bold.woff2","/fonts/Roboto-Italic.woff2","/fonts/Roboto-Mono-Italic.woff2","/fonts/Roboto-Mono.woff2","/fonts/Roboto.woff2","/fr/atom.xml","/fr/","/images/ferris-gesture.svg","/images/ferris.svg","/js/abridge.min.js","/js/abridge_nopwa.min.js","/js/abridge_nosearch.min.js","/js/abridge_nosearch_nopwa.min.js","/js/codecopy.js","/js/elasticlunr.min.js","/js/email.js","/js/katex-auto-render.min.js","/js/katex.min.js","/js/katexbundle.min.js","/js/katexbundle.min.old.js","/js/katexoptions.js","/js/lunr.da.js","/js/lunr.da.min.js","/js/lunr.de.js","/js/lunr.de.min.js","/js/lunr.du.js","/js/lunr.du.min.js","/js/lunr.es.js","/js/lunr.es.min.js","/js/lunr.fi.js","/js/lunr.fi.min.js","/js/lunr.fr.js","/js/lunr.fr.min.js","/js/lunr.hu.js","/js/lunr.hu.min.js","/js/lunr.it.js","/js/lunr.it.min.js","/js/lunr.jp.js","/js/lunr.jp.min.js","/js/lunr.no.js","/js/lunr.no.min.js","/js/lunr.pt.js","/js/lunr.pt.min.js","/js/lunr.ro.js","/js/lunr.ro.min.js","/js/lunr.ru.js","/js/lunr.ru.min.js","/js/lunr.stemmer.support.js","/js/lunr.stemmer.support.min.js","/js/lunr.sv.js","/js/lunr.sv.min.js","/js/lunr.tr.js","/js/lunr.tr.min.js","/js/lunr.zh.js","/js/lunr.zh.min.js","/js/mathtex-script-type.min.js","/js/pagefind-entry.json","/js/pagefind-highlight.js","/js/pagefind-modular-ui.css","/js/pagefind-modular-ui.js","/js/pagefind-ui.css","/js/pagefind-ui.js","/js/pagefind.index.js","/js/pagefind.js","/js/pagefind.search.js","/js/prestyle.js","/js/search.js","/js/searchChange.js","/js/search_elasticlunr.min.js","/js/search_elasticlunr_jindex.min.js","/js/search_stork.min.js","/js/search_tinysearch.min.js","/js/searchjava.js","/js/searchjavaugly.js","/js/stork.js","/js/stork_config.js","/js/sw_load.js","/js/sw_load.min.js","/js/theme.js","/js/theme.min.js","/js/theme_button.js","/js/theme_light.js","/js/theme_light.min.js","/js/tinysearch.js","/js/wasm.en.pagefind","/js/wasm.es.pagefind","/js/wasm.fr.pagefind","/js/wasm.unknown.pagefind","/offline/","/overview-abridge/","/overview-abridge/lighthouse.png","/overview-code-blocks/","/overview-images/corro.svg","/overview-images/ferris-gesture.png","/overview-images/ferris-gesture.svg","/overview-images/ferris-happy.svg","/overview-images/ferris.svg","/overview-images/","/overview-markdown-and-style/","/overview-math/","/overview-rich-content/","/overview-rich-content/over9000-400.avif","/overview-rich-content/over9000-640.avif","/overview-rich-content/over9000-640.webp","/overview-rich-content/over9000-960.avif","/overview-rich-content/over9000.mp3","/overview-rich-content/over9000.ogg","/overview-rich-content/over9000_av1.mp4","/overview-rich-content/over9000_vp9.webm","/overview-showdata/","/privacy/","/tags/","/es/archive/","/es/blog/","/es/tags/","/fr/about/","/fr/archive/","/fr/blog/","/fr/contact/","/fr/offline/","/fr/overview-abridge/","/fr/overview-abridge/lighthouse.png","/fr/overview-code-blocks/","/fr/overview-images/corro.svg","/fr/overview-images/ferris-gesture.png","/fr/overview-images/ferris-gesture.svg","/fr/overview-images/ferris-happy.svg","/fr/overview-images/ferris.svg","/fr/overview-images/","/fr/overview-markdown-and-style/","/fr/overview-math/","/fr/overview-rich-content/","/fr/overview-rich-content/over9000-400.avif","/fr/overview-rich-content/over9000-640.avif","/fr/overview-rich-content/over9000-640.webp","/fr/overview-rich-content/over9000-960.avif","/fr/overview-rich-content/over9000.mp3","/fr/overview-rich-content/over9000.ogg","/fr/overview-rich-content/over9000_av1.mp4","/fr/overview-rich-content/over9000_vp9.webm","/fr/overview-showdata/","/fr/privacy/","/fr/tags/","/overview-images/img/ferris-gesture.svg","/overview-images/img/ferris.svg","/page/1/","/page/2/","/page/3/","/page/4/","/tags/audio/atom.xml","/tags/audio/","/tags/config/atom.xml","/tags/config/","/tags/data/atom.xml","/tags/data/","/tags/features/atom.xml","/tags/features/","/tags/images/atom.xml","/tags/images/","/tags/markdown/atom.xml","/tags/markdown/","/tags/mathematics/atom.xml","/tags/mathematics/","/tags/shortcodes/atom.xml","/tags/shortcodes/","/tags/video/atom.xml","/tags/video/","/video-streaming-sites/overview-embed-streamable/","/video-streaming-sites/overview-embed-vimeo/","/video-streaming-sites/overview-embed-youtube/","/blog/page/1/","/es/page/1/","/es/tags/features/atom.xml","/es/tags/features/","/es/tags/shortcodes/atom.xml","/es/tags/shortcodes/","/es/tags/video/atom.xml","/es/tags/video/","/es/video-streaming-sites/overview-embed-streamable/","/fr/overview-images/img/ferris-gesture.svg","/fr/overview-images/img/ferris.svg","/fr/page/1/","/fr/page/2/","/fr/page/3/","/fr/page/4/","/fr/tags/audio/atom.xml","/fr/tags/audio/","/fr/tags/config/atom.xml","/fr/tags/config/","/fr/tags/data/atom.xml","/fr/tags/data/","/fr/tags/features/atom.xml","/fr/tags/features/","/fr/tags/images/atom.xml","/fr/tags/images/","/fr/tags/markdown/atom.xml","/fr/tags/markdown/","/fr/tags/mathematics/atom.xml","/fr/tags/mathematics/","/fr/tags/shortcodes/atom.xml","/fr/tags/shortcodes/","/fr/tags/video/atom.xml","/fr/tags/video/","/fr/video-streaming-sites/overview-embed-streamable/","/fr/video-streaming-sites/overview-embed-vimeo/","/fr/video-streaming-sites/overview-embed-youtube/","/es/blog/page/1/","/fr/blog/page/1/"],this.host=e.location.protocol+"//"+e.location.host,this.OFFLINE_PAGE="/offline/",this.NOT_FOUND_PAGE="/404.html",this.CACHE_NAME="content-v"+this.CACHE_VERSION,this.NORM_TTL=0,this.LONG_TTL=0,this.TTL_NORM=["sw.min.js","sw_load.min.js"],this.TTL_LONG=["jpg","jpeg","png","gif","webp","avif","ico","svg","xsl","txt"],this.TTL_EXEMPT=["js","css","otf","eot","ttf","woff","woff2","mp4","webm","mp3","ogg"]}canCache(e){return!e.startsWith("http://localhost")&&e.toString().startsWith(this.host)}getFileExtension(e){e=e.split(".").reverse()[0].split("?")[0];return e.endsWith("/")?"/":e}getFileName(e){e=e.substring(1+e.lastIndexOf("/")).split("?")[0];return e.endsWith("/")?"/":e}getTTL(e){var s;return"string"==typeof e?(s=this.getFileExtension(e),e=this.getFileName(e),~this.TTL_NORM.indexOf(e)?this.NORM_TTL:~this.TTL_LONG.indexOf(s)?this.LONG_TTL:~this.TTL_EXEMPT.indexOf(s)?null:this.NORM_TTL):null}async installServiceWorker(){try{return await caches.open(this.CACHE_NAME).then(e=>e.addAll(this.BASE_CACHE_FILES),e=>{}),this.scope.skipWaiting()}catch(e){}}cleanupLegacyCache(){let r=[this.CACHE_NAME];return new Promise((s,t)=>{caches.keys().then(e=>e.filter(e=>!~r.indexOf(e))).then(e=>{e.length?Promise.all(e.map(e=>caches.delete(e))).then(()=>s()).catch(e=>{t(e)}):s()}).catch(e=>{t(e)})})}async preCacheUrl(s){let t=await caches.open(this.CACHE_NAME);return await t.match(s)?null:fetch(s).then(e=>t.put(s,e.clone()))}register(){this.scope.addEventListener("install",e=>{e.waitUntil(Promise.all([this.installServiceWorker(),this.scope.skipWaiting()]))}),this.scope.addEventListener("activate",s=>{s.waitUntil(Promise.all([this.cleanupLegacyCache(),this.scope.clients.claim(),this.scope.skipWaiting()]).catch(e=>{s.skipWaiting()}))}),this.scope.addEventListener("fetch",o=>{o.respondWith(caches.open(this.CACHE_NAME).then(async s=>{if(!this.canCache(o.request.url))return fetch(o.request);let t=await s.match(o.request);if(t){var r;let e=null;for(r of t.headers.entries())if("date"===r[0]){e=new Date(r[1]);break}if(!e)return t;var i=parseInt(""+((new Date).getTime()-e.getTime())/1e3),a=this.getTTL(o.request.url);if(null===a||a&&i<a)return t}return fetch(o.request.clone()).then(e=>e.status<400?(this.canCache(o.request.url)&&s.put(o.request,e.clone()),e):s.match(this.NOT_FOUND_PAGE)).catch(e=>(o.request.url,t||s.match(this.OFFLINE_PAGE)))}))})}}let pwa=new Pwa(self);pwa.register(); \ No newline at end of file
+class Pwa{constructor(e){this.scope=e;var s=new URL(location).searchParams.get("v");this.CACHE_VERSION=s,this.BASE_CACHE_FILES=["/404.html","/_headers","/abridge.css","/android-chrome-192x192.png","/android-chrome-512x512.png","/apple-touch-icon.png","/atom.xml","/banner.png","/browserconfig.xml","/demo.html","/elasticlunr.min.js","/favicon-16x16.png","/favicon-32x32.png","/favicon.ico","/favicon.svg","/","/katex.min.css","/m1024.png","/m128.png","/m192.png","/m384.png","/m48.png","/m512.png","/m72.png","/m96.png","/manifest.json","/manifest.min.json","/mstile-150x150.png","/nojs.css","/package.json","/robots.txt","/safari-pinned-tab.svg","/search_index.en.json","/search_index.es.json","/search_index.fr.json","/search_index.pt.json","/sitemap.xml","/tinysearch_engine.d.ts","/tinysearch_engine.js","/tinysearch_engine_bg.wasm","/tinysearch_engine_bg.wasm.d.ts","/about/","/archive/","/blog/","/contact/","/es/atom.xml","/es/","/fonts/KaTeX_AMS-Regular.woff2","/fonts/KaTeX_Caligraphic-Bold.woff2","/fonts/KaTeX_Caligraphic-Regular.woff2","/fonts/KaTeX_Fraktur-Bold.woff2","/fonts/KaTeX_Fraktur-Regular.woff2","/fonts/KaTeX_Main-Bold.woff2","/fonts/KaTeX_Main-BoldItalic.woff2","/fonts/KaTeX_Main-Italic.woff2","/fonts/KaTeX_Main-Regular.woff2","/fonts/KaTeX_Math-BoldItalic.woff2","/fonts/KaTeX_Math-Italic.woff2","/fonts/KaTeX_SansSerif-Bold.woff2","/fonts/KaTeX_SansSerif-Italic.woff2","/fonts/KaTeX_SansSerif-Regular.woff2","/fonts/KaTeX_Script-Regular.woff2","/fonts/KaTeX_Size1-Regular.woff2","/fonts/KaTeX_Size2-Regular.woff2","/fonts/KaTeX_Size3-Regular.woff2","/fonts/KaTeX_Size4-Regular.woff2","/fonts/KaTeX_Typewriter-Regular.woff2","/fonts/Roboto-Bold.woff2","/fonts/Roboto-Italic.woff2","/fonts/Roboto-Mono-Italic.woff2","/fonts/Roboto-Mono.woff2","/fonts/Roboto.woff2","/fr/atom.xml","/fr/","/images/ferris-gesture.svg","/images/ferris.svg","/js/abridge.min.js","/js/abridge_nopwa.min.js","/js/abridge_nosearch.min.js","/js/abridge_nosearch_nopwa.min.js","/js/codecopy.js","/js/elasticlunr.min.js","/js/email.js","/js/katex-auto-render.min.js","/js/katex.min.js","/js/katexbundle.min.js","/js/katexbundle.min.old.js","/js/katexoptions.js","/js/lunr.da.js","/js/lunr.da.min.js","/js/lunr.de.js","/js/lunr.de.min.js","/js/lunr.du.js","/js/lunr.du.min.js","/js/lunr.es.js","/js/lunr.es.min.js","/js/lunr.fi.js","/js/lunr.fi.min.js","/js/lunr.fr.js","/js/lunr.fr.min.js","/js/lunr.hu.js","/js/lunr.hu.min.js","/js/lunr.it.js","/js/lunr.it.min.js","/js/lunr.jp.js","/js/lunr.jp.min.js","/js/lunr.no.js","/js/lunr.no.min.js","/js/lunr.pt.js","/js/lunr.pt.min.js","/js/lunr.ro.js","/js/lunr.ro.min.js","/js/lunr.ru.js","/js/lunr.ru.min.js","/js/lunr.stemmer.support.js","/js/lunr.stemmer.support.min.js","/js/lunr.sv.js","/js/lunr.sv.min.js","/js/lunr.tr.js","/js/lunr.tr.min.js","/js/lunr.zh.js","/js/lunr.zh.min.js","/js/mathtex-script-type.min.js","/js/pagefind-entry.json","/js/pagefind-highlight.js","/js/pagefind-modular-ui.css","/js/pagefind-modular-ui.js","/js/pagefind-ui.css","/js/pagefind-ui.js","/js/pagefind.en_9a3bf9aefa.pf_meta","/js/pagefind.es_f4a7172a38.pf_meta","/js/pagefind.fr_6374b78f36.pf_meta","/js/pagefind.index.cjs","/js/pagefind.js","/js/pagefind.search.js","/js/prestyle.js","/js/search.js","/js/search_elasticlunr.min.js","/js/search_elasticlunr_jindex.min.js","/js/search_tinysearch.min.js","/js/searchjava.js","/js/searchjavaugly.js","/js/sw_load.js","/js/sw_load.min.js","/js/theme.js","/js/theme.min.js","/js/theme_button.js","/js/theme_light.js","/js/theme_light.min.js","/js/tinysearch.js","/js/wasm.en.pagefind","/js/wasm.es.pagefind","/js/wasm.fr.pagefind","/js/wasm.unknown.pagefind","/offline/","/overview-abridge/","/overview-abridge/lighthouse.png","/overview-code-blocks/","/overview-images/corro.svg","/overview-images/ferris-gesture.png","/overview-images/ferris-gesture.svg","/overview-images/ferris-happy.svg","/overview-images/ferris.svg","/overview-images/","/overview-markdown-and-style/","/overview-math/","/overview-rich-content/","/overview-rich-content/over9000-400.avif","/overview-rich-content/over9000-640.avif","/overview-rich-content/over9000-640.webp","/overview-rich-content/over9000-960.avif","/overview-rich-content/over9000.mp3","/overview-rich-content/over9000.ogg","/overview-rich-content/over9000_av1.mp4","/overview-rich-content/over9000_vp9.webm","/overview-showdata/","/privacy/","/pt/","/tags/","/es/archive/","/es/blog/","/es/tags/","/fr/about/","/fr/archive/","/fr/blog/","/fr/contact/","/fr/offline/","/fr/overview-code-blocks/","/fr/overview-images/corro.svg","/fr/overview-images/ferris-gesture.png","/fr/overview-images/ferris-gesture.svg","/fr/overview-images/ferris-happy.svg","/fr/overview-images/ferris.svg","/fr/overview-images/","/fr/overview-markdown-and-style/","/fr/overview-math/","/fr/overview-rich-content/","/fr/overview-rich-content/over9000-400.avif","/fr/overview-rich-content/over9000-640.avif","/fr/overview-rich-content/over9000-640.webp","/fr/overview-rich-content/over9000-960.avif","/fr/overview-rich-content/over9000.mp3","/fr/overview-rich-content/over9000.ogg","/fr/overview-rich-content/over9000_av1.mp4","/fr/overview-rich-content/over9000_vp9.webm","/fr/overview-showdata/","/fr/privacy/","/fr/tags/","/js/fragment/en_13419a6.pf_fragment","/js/fragment/en_2ac01ba.pf_fragment","/js/fragment/en_2d5f183.pf_fragment","/js/fragment/en_2e4fad3.pf_fragment","/js/fragment/en_5f16a37.pf_fragment","/js/fragment/en_7897259.pf_fragment","/js/fragment/en_8caec6c.pf_fragment","/js/fragment/en_8edb393.pf_fragment","/js/fragment/en_8f525ab.pf_fragment","/js/fragment/en_addec89.pf_fragment","/js/fragment/en_c821f77.pf_fragment","/js/fragment/en_eb58f87.pf_fragment","/js/fragment/en_f4821f1.pf_fragment","/js/fragment/en_f93465d.pf_fragment","/js/fragment/en_f96e4a8.pf_fragment","/js/fragment/es_3ec1224.pf_fragment","/js/fragment/es_591c668.pf_fragment","/js/fragment/fr_286d56a.pf_fragment","/js/fragment/fr_689c2d9.pf_fragment","/js/fragment/fr_7263c1f.pf_fragment","/js/fragment/fr_8418aed.pf_fragment","/js/fragment/fr_84444d8.pf_fragment","/js/fragment/fr_85d6df3.pf_fragment","/js/fragment/fr_8c1bc26.pf_fragment","/js/fragment/fr_8d4726b.pf_fragment","/js/fragment/fr_ba21b65.pf_fragment","/js/fragment/fr_f98357a.pf_fragment","/js/index/en_43498ed.pf_index","/js/index/es_29a1d7e.pf_index","/js/index/fr_b717c97.pf_index","/overview-images/img/ferris-gesture.svg","/overview-images/img/ferris.svg","/page/1/","/page/2/","/page/3/","/page/4/","/tags/audio/atom.xml","/tags/audio/","/tags/config/atom.xml","/tags/config/","/tags/data/atom.xml","/tags/data/","/tags/features/atom.xml","/tags/features/","/tags/images/atom.xml","/tags/images/","/tags/markdown/atom.xml","/tags/markdown/","/tags/mathematics/atom.xml","/tags/mathematics/","/tags/shortcodes/atom.xml","/tags/shortcodes/","/tags/video/atom.xml","/tags/video/","/video-streaming-sites/overview-embed-streamable/","/video-streaming-sites/overview-embed-vimeo/","/video-streaming-sites/overview-embed-youtube/","/blog/page/1/","/es/page/1/","/es/tags/features/atom.xml","/es/tags/features/","/es/tags/shortcodes/atom.xml","/es/tags/shortcodes/","/es/tags/video/atom.xml","/es/tags/video/","/es/video-streaming-sites/overview-embed-streamable/","/fr/overview-images/img/ferris-gesture.svg","/fr/overview-images/img/ferris.svg","/fr/page/1/","/fr/page/2/","/fr/page/3/","/fr/tags/audio/atom.xml","/fr/tags/audio/","/fr/tags/data/atom.xml","/fr/tags/data/","/fr/tags/features/atom.xml","/fr/tags/features/","/fr/tags/images/atom.xml","/fr/tags/images/","/fr/tags/markdown/atom.xml","/fr/tags/markdown/","/fr/tags/mathematics/atom.xml","/fr/tags/mathematics/","/fr/tags/shortcodes/atom.xml","/fr/tags/shortcodes/","/fr/tags/video/atom.xml","/fr/tags/video/","/fr/video-streaming-sites/overview-embed-streamable/","/fr/video-streaming-sites/overview-embed-vimeo/","/fr/video-streaming-sites/overview-embed-youtube/","/pt/page/1/","/es/blog/page/1/","/fr/blog/page/1/"],this.host=e.location.protocol+"//"+e.location.host,this.OFFLINE_PAGE="/offline/",this.NOT_FOUND_PAGE="/404.html",this.CACHE_NAME="content-v"+this.CACHE_VERSION,this.NORM_TTL=0,this.LONG_TTL=0,this.TTL_NORM=["sw.min.js","sw_load.min.js"],this.TTL_LONG=["jpg","jpeg","png","gif","webp","avif","ico","svg","xsl","txt"],this.TTL_EXEMPT=["js","css","otf","eot","ttf","woff","woff2","mp4","webm","mp3","ogg"]}canCache(e){return!e.startsWith("http://localhost")&&e.toString().startsWith(this.host)}getFileExtension(e){e=e.split(".").reverse()[0].split("?")[0];return e.endsWith("/")?"/":e}getFileName(e){e=e.substring(1+e.lastIndexOf("/")).split("?")[0];return e.endsWith("/")?"/":e}getTTL(e){var s;return"string"==typeof e?(s=this.getFileExtension(e),e=this.getFileName(e),~this.TTL_NORM.indexOf(e)?this.NORM_TTL:~this.TTL_LONG.indexOf(s)?this.LONG_TTL:~this.TTL_EXEMPT.indexOf(s)?null:this.NORM_TTL):null}async installServiceWorker(){try{return await caches.open(this.CACHE_NAME).then(e=>e.addAll(this.BASE_CACHE_FILES),e=>{}),this.scope.skipWaiting()}catch(e){}}cleanupLegacyCache(){let a=[this.CACHE_NAME];return new Promise((s,t)=>{caches.keys().then(e=>e.filter(e=>!~a.indexOf(e))).then(e=>{e.length?Promise.all(e.map(e=>caches.delete(e))).then(()=>s()).catch(e=>{t(e)}):s()}).catch(e=>{t(e)})})}async preCacheUrl(s){let t=await caches.open(this.CACHE_NAME);return await t.match(s)?null:fetch(s).then(e=>t.put(s,e.clone()))}register(){this.scope.addEventListener("install",e=>{e.waitUntil(Promise.all([this.installServiceWorker(),this.scope.skipWaiting()]))}),this.scope.addEventListener("activate",s=>{s.waitUntil(Promise.all([this.cleanupLegacyCache(),this.scope.clients.claim(),this.scope.skipWaiting()]).catch(e=>{s.skipWaiting()}))}),this.scope.addEventListener("fetch",i=>{i.respondWith(caches.open(this.CACHE_NAME).then(async s=>{if(!this.canCache(i.request.url))return fetch(i.request);let t=await s.match(i.request);if(t){var a;let e=null;for(a of t.headers.entries())if("date"===a[0]){e=new Date(a[1]);break}if(!e)return t;var r=parseInt(""+((new Date).getTime()-e.getTime())/1e3),n=this.getTTL(i.request.url);if(null===n||n&&r<n)return t}return fetch(i.request.clone()).then(e=>e.status<400?(this.canCache(i.request.url)&&s.put(i.request,e.clone()),e):s.match(this.NOT_FOUND_PAGE)).catch(e=>(i.request.url,t||s.match(this.OFFLINE_PAGE)))}))})}}let pwa=new Pwa(self);pwa.register(); \ No newline at end of file
diff --git a/static/tinysearch_engine_bg.wasm b/static/tinysearch_engine_bg.wasm
new file mode 100644
index 0000000..6524c13
--- /dev/null
+++ b/static/tinysearch_engine_bg.wasm
Binary files differ
diff --git a/templates/404.html b/templates/404.html
index fee5607..40fb731 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{%- block seo %}
{{ super() }}
diff --git a/templates/archive.html b/templates/archive.html
index 587d7ea..e078bdd 100644
--- a/templates/archive.html
+++ b/templates/archive.html
@@ -5,7 +5,7 @@ This Template can also be used as the rendering template for Sections, eg: examp
{% extends "base.html" %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{%- block seo %}
{{- super() }}
diff --git a/templates/base.html b/templates/base.html
index 1604dbe..3096ac2 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -5,7 +5,7 @@
{%- if not i18n -%}{%- set i18n = load_data(path="themes/abridge/i18n/" ~ lang ~ ".toml", required=false) -%}{%- endif %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
<!DOCTYPE html>
<html lang="{%- if lang != config.default_language %}{{ lang }}{% else %}{{ config.extra.language_code | default(value=lang) }}{% endif %}">
<head>
@@ -98,10 +98,10 @@
<div>
<form autocomplete=off class="js" name="goSearch" id="searchbox">
<div class="searchd">
- <input id="searchinput" type="text" placeholder="{{ macros::translate(key="Search", default="Search", i18n=i18n) }}" title="Search"{% if config.extra.search_library %}{% if config.extra.search_library == "stork" %} data-stork="stork" {% endif %}{% endif %} />
+ <input id="searchinput" type="text" placeholder="{{ macros::translate(key="Search", default="Search", i18n=i18n) }}" title="Search" />
<button type="submit" title="Search" class="{%- if icon_search -%}{{ icon_search }}{%- else -%}si{%- endif -%}">{%- if not icon_search -%}&#8981;{%- endif -%}</button>
</div>
- <div class="results"><div id="suggestions"{% if config.extra.search_library %}{% if config.extra.search_library == "stork" %} data-stork="stork-output" {% endif %}{% endif %}></div></div>
+ <div class="results"><div id="suggestions"></div></div>
</form>
</div>
{%- endif %}
diff --git a/templates/categories/list.html b/templates/categories/list.html
index 506613c..b01b37f 100644
--- a/templates/categories/list.html
+++ b/templates/categories/list.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{%- block seo %}
{{- super() }}
diff --git a/templates/categories/single.html b/templates/categories/single.html
index be219aa..ba86397 100644
--- a/templates/categories/single.html
+++ b/templates/categories/single.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{%- block seo %}
{{- super() }}
diff --git a/templates/index.html b/templates/index.html
index 0b1e83f..802f328 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -5,7 +5,8 @@ This Template can also be used directly for the index eg: example.com/ or as the
{%- extends "base.html" %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
+
{%- block seo %}
{{- super() }}
diff --git a/templates/macros/create_stork_toml.html b/templates/macros/create_stork_toml.html
deleted file mode 100644
index ee1d765..0000000
--- a/templates/macros/create_stork_toml.html
+++ /dev/null
@@ -1,15 +0,0 @@
-{%- macro from_section(section) -%}
-{%- set section = get_section(path=section) -%}
-{%- for post in section.pages -%}
-{%- if not post.draft %} {path = {{ '.' ~ post.path ~ 'index.html' | json_encode | safe }}, url = {{ post.permalink | json_encode | safe }}, title = {{ post.title | striptags | json_encode | safe }}}
-{%- set found = true -%}
-{%- if not loop.last -%},
-{% endif -%}
-{%- endif -%}
-{%- endfor -%}
-{%- if found and section.subsections -%},
-{% for subsection in section.subsections -%}
-{{ self::from_section(section=subsection) }}
-{%- endfor -%}
-{%- endif -%}
-{%- endmacro from_section -%}
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index dd3fcff..dd7b975 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -4,7 +4,7 @@
{%- macro page_listing(page, config) %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
<div class="tpad">
<a href="{{ page.permalink | safe}}{%- if uglyurls %}index.html{%- endif %}">{{ page.title }}</a>
</div>
@@ -13,7 +13,7 @@
{%- macro series_link(inner, page, config) %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{%- if inner.content == page.content %}
<li><a class="scur" href="{{ inner.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ inner.title }}</a></li>
{% else %}
@@ -24,7 +24,7 @@
{%- macro title_post(page, config) %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
<h1><a href="{{ page.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ page.title }}</a></h1>
{%- endmacro title_post %}
@@ -36,7 +36,7 @@
{%- if not i18n -%}{%- set i18n = load_data(path="themes/abridge/i18n/" ~ lang ~ ".toml", required=false) -%}{%- endif %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
<span{%- if config.extra.meta_post.size %} class="{{ config.extra.meta_post.size }}"{% endif %}>
{#- Author #}
@@ -99,7 +99,7 @@
{%- macro title_index(page, config) %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
<h1>{% if config.extra.title_size_index %}<span class="{{ config.extra.title_size_index }}">{% endif %}<a href="{{ page.permalink | safe }}{%- if uglyurls %}index.html{%- endif %}">{{ page.title }}</a>{% if config.extra.title_size_index %}</span>{% endif %}</h1>
{%- endmacro title_index %}
@@ -110,7 +110,7 @@
{%- set i18n = load_data(path="i18n/" ~ lang ~ '.toml', required=false) -%}
{%- if not i18n -%}{%- set i18n = load_data(path="themes/abridge/i18n/" ~ lang ~ ".toml", required=false) -%}{%- endif %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
<span{%- if config.extra.meta_index.size %} class="{{ config.extra.meta_index.size }}"{% endif %}>
{#- Author #}
@@ -173,7 +173,7 @@
{%- macro footer(page, config) %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{#- prev/next content page nextprev title pagination #}
{%- if not config.extra.hide_page_nextprev_titles | default(value=false) %}
{%- if page.lower or page.higher %}
@@ -197,7 +197,7 @@
{%- macro pagination(paginator, config)%}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{%- if paginator.number_pagers > 1 %}
{%- if paginator.number_pagers <= 5 %} {# 5 or less pager is simple, just display all 5 #}
{%- set start = 1 %}
@@ -304,7 +304,7 @@
{%- macro numpagination(paginator, config)%}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{%- if paginator.number_pagers > 1 %}
{%- if paginator.number_pagers <= 5 %} {# 5 or less pager is simple, just display all 5 #}
{%- set start = 1 %}
diff --git a/templates/partials/head.html b/templates/partials/head.html
index 98d2382..1b95cc8 100644
--- a/templates/partials/head.html
+++ b/templates/partials/head.html
@@ -1,7 +1,7 @@
{#- Theme Switcher Button to toggle between dark/light #}
{%- set integrity = config.extra.integrity | default(value=true) -%}
- {%- if config.extra.offline %}{% set integrity = false %}{% endif %}
+ {%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set integrity = false %}{% endif %}{% endif %}
{%- if config.extra.js_switcher | default(value=true) %}
{%- set js_theme="js/theme.min.js" %}
@@ -90,7 +90,7 @@
{#- Style Sheets Preload #}
{%- set integrity = config.extra.integrity | default(value=true) -%}
- {%- if config.extra.offline %}{% set integrity = false %}{% endif %}
+ {%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set integrity = false %}{% endif %}{% endif %}
{%- if config.extra.fonts %}{%- for i in config.extra.fonts %}
{%- if i.url is matching("^http[s]?://") %}
diff --git a/templates/partials/head_js.html b/templates/partials/head_js.html
index 33088ec..2a16b6d 100644
--- a/templates/partials/head_js.html
+++ b/templates/partials/head_js.html
@@ -1,6 +1,6 @@
{#- JAVASCRIPT #}
{%- set integrity = config.extra.integrity | default(value=true) -%}
- {%- if config.extra.offline %}{% set integrity = false %}{% endif %}
+ {%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set integrity = false %}{% endif %}{% endif %}
{%- set search_library=config.extra.search_library | default(value="elasticlunr") -%}
{%- set preStyle = false %}
@@ -75,8 +75,6 @@
{%- if search_library == "tinysearch" %}
<script defer type="module" src="{{ get_url(path='js/tinysearch.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/tinysearch.js' , sha_type=384, base64=true) | safe }}"{%- endif %}></script>
- {%- elif search_library == "stork" %}
- <script defer type="module" src="{{ get_url(path='js/search_stork.min.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/search_stork.min.js' , sha_type=384, base64=true) | safe }}"{%- endif %}></script>
{%- elif config.build_search_index %}
{%- set search_index_format="elasticlunr_json" -%}
@@ -87,7 +85,7 @@
{%- endif %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
- {%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+ {%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{%- if search_index_format == "elasticlunr_javascript" %}{#- Javascript index format #}
<script defer src="{{ get_url(path='js/elasticlunr.min.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='js/elasticlunr.min.js' , sha_type=384, base64=true) | safe }}"{%- endif %}></script>
<script defer src="{{ get_url(path='search_index.' ~ lang ~ '.js' , trailing_slash=false, cachebust=true) | safe }}"{%- if integrity %} integrity="sha384-{{ get_hash(path='search_index.' ~ lang ~ '.js' , sha_type=384, base64=true) | safe }}"{%- endif %}></script>
@@ -163,4 +161,4 @@
-{#- End of head_js partial -#} \ No newline at end of file
+{#- End of head_js partial -#}
diff --git a/templates/stork_toml.html b/templates/stork_toml.html
deleted file mode 100644
index 816fcd4..0000000
--- a/templates/stork_toml.html
+++ /dev/null
@@ -1,9 +0,0 @@
-{%- import "macros/create_stork_toml.html" as create_stork_toml -%}
-
-{%- if config.extra.search_library %}{%- if config.extra.search_library == "stork" %}
-[input]
-base_directory = "public"
-files = [
-{{ create_stork_toml::from_section(section="_index.md", config=config) }}
-]
-{%- endif %}{%- endif %} \ No newline at end of file
diff --git a/templates/tags/list.html b/templates/tags/list.html
index 8ed7b5c..5e7650f 100644
--- a/templates/tags/list.html
+++ b/templates/tags/list.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{%- block seo %}
{{- super() }}
diff --git a/templates/tags/single.html b/templates/tags/single.html
index a57b1f7..723a47e 100644
--- a/templates/tags/single.html
+++ b/templates/tags/single.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{%- set uglyurls = config.extra.uglyurls | default(value=false) -%}
-{%- if config.extra.offline %}{% set uglyurls = true %}{% endif %}
+{%- if config.extra.search_library %}{%- if config.extra.search_library == "offline" %}{% set uglyurls = true %}{% endif %}{% endif %}
{%- block seo %}
{{- super() }}