roger pence

Potentially, each day is crucial in the total development

Search
Advanced Search
Folder to search:
Limit search to one of these properties:

    FlexSearch workflow

    FlexSearch workflow

    flowchart TB subgraph build["Build time (Eleventy)"] posts["collections.posts"] -->|"search-index.njk"| json["/search-index.json\n(id, title, url, tags, content)"] bundle["node_modules/flexsearch/.../flexsearch.bundle.module.min.mjs"] -->|"passthrough copy\n(.eleventy.js)"| bundleOut["/assets/flexsearch.bundle.module.min.js"] end subgraph page["Page (main thread) — search.js"] openBtn["#search-open click"] --> dialogOpen["dialog.showModal()"] fetchIdx["fetch('/search-index.json')"] -->|"posts array"| initMsg["postMessage\n{type:'init', data:{posts}}"] input["#search-input 'input' event"] -->|"indexReady?"| searchMsg["postMessage\n{type:'search', data:{query}}"] onMsg["worker.onmessage"] -->|"type:'ready'"| ready["indexReady = true"] onMsg -->|"type:'results'"| render["renderResults(docs)\n→ #search-results"] end subgraph worker["search-worker.js (Web Worker)"] idxInit["Document index created\n(fields: title, content, tags)"] idxSearch["search(query)\nfield-prefixed 'field:term'\nor searchAllFields()"] idxInit -->|"postMessage {type:'ready'}"| onMsg idxSearch -->|"postMessage {type:'results', data}"| onMsg end json -.->|"fetched on page load"| fetchIdx bundleOut -.->|"import Document"| worker initMsg -->|"onmessage 'init'"| idxInit searchMsg -->|"onmessage 'search'"| idxSearch