{"id":19768346,"url":"https://github.com/roxiness/poindexter","last_synced_at":"2025-04-30T16:34:13.370Z","repository":{"id":51241272,"uuid":"314868584","full_name":"roxiness/poindexter","owner":"roxiness","description":"Search engine for your static site","archived":false,"fork":false,"pushed_at":"2021-05-19T11:06:34.000Z","size":647,"stargazers_count":74,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T03:11:44.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roxiness.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-21T17:41:49.000Z","updated_at":"2024-07-02T07:26:06.000Z","dependencies_parsed_at":"2022-09-07T17:51:28.069Z","dependency_job_id":null,"html_url":"https://github.com/roxiness/poindexter","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roxiness%2Fpoindexter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roxiness%2Fpoindexter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roxiness%2Fpoindexter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roxiness%2Fpoindexter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roxiness","download_url":"https://codeload.github.com/roxiness/poindexter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251742833,"owners_count":21636518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T04:37:39.427Z","updated_at":"2025-04-30T16:34:12.466Z","avatar_url":"https://github.com/roxiness.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./poindexter.svg\" width=\"300px\"\u003e\n  \n  **Search engine for your static site.**\n\n   Powered by [FlexSearch](https://github.com/nextapps-de/flexsearch)\n\n   \u003cbr /\u003e\n   \u003cbr /\u003e\n\u003c/div\u003e\n\n\nPoindexter scans a folder for HTML files and indexes each file's content by its relative filename. The full index is output to `poindexter.bundle.js`, which can be imported and searched with poindexter or flexsearch.\n\n# Getting started\n\n### Create a searchable index\n\n```\nnpx poindexter [HTML folder] -o [output path]\n```\n\n### Searching with Poindexter\n\n```javascript\n  import { client } from \"poindexter/runtime\";  \n\n  // loads the poindexter.bundle.json.\n  // for custom path: `client.init({ path: '/path/to/poindexter.bundle.js' })`\n  client.init()\n\n  // search the index.\n  client.index.search(query)\n```\n\n### Narrowing the indexable area\nTo avoid indexing navbars and widgets, Poindexter provide the following options.\n\n**contentSelectors** An array of selectors. Poindexter tries each selector untill a match is found. Only the content of the first match is indexed. If no match is found, the page is skipped.\n\n**IgnoreSelectors** An array of selectors. Poindexter removes any elements matching these selectors.\n\nPlease refer to the [scrape function](https://github.com/roxiness/poindexter/blob/master/defaults.js#L19) for more info. Alternatively you can use your own scrape function.\n\n### Options\nPlease refer to the [defaults](https://github.com/roxiness/poindexter/blob/master/defaults.js) for now.\n\n### Configuration\nThanks to [Configent](https://github.com/roxiness/configent) Poindexter can be configured here \n- poindexter.config.js\n- package.json (create a poindexter field)\n- environment\n- .env\n- command line\n- API\n\n### Title, description and keywords\nPoindexter assumes that title, meta description and meta keywords are available in your HTML. Please refer to [defaults](https://github.com/roxiness/poindexter/blob/master/defaults.js#L16) If this is not the case, you can create your own resolvers.\n\nCustom resolvers\n```javascript\n{\n  title: $ =\u003e 'my website',\n  description: $ =\u003e $('.description') || 'no description',\n  keywords: $ =\u003e $('meta[name=keywords]').attr('content').split(',')\n}\n```\n\n# FAQ\n\n#### Can I use Poindexter with a SPA?\nPoindexter requires a static site. If you have a SPA, have a look at [Spank](https://github.com/roxiness/spank).\n\n#### Where can I use Poindexter?\nPoindexter can be served from the client, your own backend or a serverless function.\n\n#### How big are the index bundles?\nA site like [routify.dev](https://routify.dev) with 65 pages, generates a 65 kb bundle after brotli compression.\n\n---\n\n# Example\n\n[Routify dev build](https://routify-2020-git-searchify.sveltaforce.now.sh/)\n\u003cimg src=\"./poindexter.gif\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froxiness%2Fpoindexter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froxiness%2Fpoindexter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froxiness%2Fpoindexter/lists"}