{"id":13553520,"url":"https://github.com/kingRayhan/ghost-finder","last_synced_at":"2025-04-03T05:31:01.224Z","repository":{"id":42179689,"uuid":"177792484","full_name":"kingRayhan/ghost-finder","owner":"kingRayhan","description":"The most advanced ghost search plugin","archived":false,"fork":false,"pushed_at":"2022-10-10T14:51:19.000Z","size":841,"stargazers_count":53,"open_issues_count":4,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T05:01:57.031Z","etag":null,"topics":["ghost","ghost-theme","search"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ghost-finder","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kingRayhan.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-26T13:19:32.000Z","updated_at":"2024-10-31T19:47:58.000Z","dependencies_parsed_at":"2022-09-10T02:11:10.241Z","dependency_job_id":null,"html_url":"https://github.com/kingRayhan/ghost-finder","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/kingRayhan%2Fghost-finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingRayhan%2Fghost-finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingRayhan%2Fghost-finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingRayhan%2Fghost-finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kingRayhan","download_url":"https://codeload.github.com/kingRayhan/ghost-finder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246944377,"owners_count":20858773,"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":["ghost","ghost-theme","search"],"created_at":"2024-08-01T12:02:27.118Z","updated_at":"2025-04-03T05:31:00.876Z","avatar_url":"https://github.com/kingRayhan.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"# Ghost Finder\nHere's a helpful npm package I made. This addon allows you to easily and sweetly incorporate search features into your ghost theme. It operates using the Ghost Content API.\n\n![](./ghost-finder-v3.png)\n\n\n![](https://img.shields.io/github/package-json/v/electronthemes/ghost-finder.svg)\n![](https://img.shields.io/github/languages/code-size/electronthemes/ghost-finder.svg)\n![](https://img.shields.io/github/license/electronthemes/ghost-finder.svg)\n![](https://img.shields.io/github/issues-raw/electronthemes/ghost-finder.svg?style=plastic)\n![](https://img.shields.io/github/last-commit/electronthemes/ghost-finder.svg)\n\n## Installation\n\n```bash\nnpm install ghost-finder\n```\n\n### OR\n\n![download](https://img.icons8.com/material-sharp/24/000000/download-2.png) [Download Latest Release](https://github.com/kingRayhan/ghost-finder/releases/latest)\n\n**Include script**\n\n```html\n\u003cscript src=\"{{asset \"ghost-finder/dist/ghost-finder.js\"}}\"\u003e\u003c/script\u003e\n```\n\n**Setup markup**\n\n```html\n\u003cdiv\u003e\n  \u003cinput id=\"search-input\" type=\"text\" placeholder=\"Type to search\" /\u003e\n  \u003cdiv id=\"search-result\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n**Activate the plugin**\n\n```js\nnew GhostFinder({\n    input: '#search-input',\n    showResult: '#search-result',\n    contentApiKey: //CONTENT API KEY...,\n})\n```\n\nTo see how you can get contentApiKey , [Click Here](https://github.com/kingrayhan/ghost-finder/wiki/How-to-get-contentApiKey-%3F)\n\n---\n\n### Options\n\n| Name                 | Default Value       | Details                                                                                                                   |\n| -------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------- |\n| input                | `null` **Required** | DOM selector of search input                                                                                              |\n| showResult           | `null` **Required** | DOM selector where search result will be pluged-in                                                                        |\n| homeUrl              | current website url | Your ghost site url                                                                                                       |\n| contentApiKey        | `null` **Required** | content api key                                                                                                           |\n| resultTemplate       | see bellow          | Result wrapper template for search result                                                                                 |\n| singleResultTemplate | see bellow          | Single search result template                                                                                             |\n| excerpt_length       | 250                 | word count to show in `##excerpt` variable                                                                                |\n| time_format          | `'MMMM dd yyyy'`    | Time format string for `##published_at` variable. [Available formats](https://date-fns.org/v2.22.1/docs/format#description) |\n\n### Default templates\n\n**Result Template**\n\n```html\n\u003cul class=\"search-results-wrapper\"\u003e\n  \u003cp\u003eSearch match(es): ##resultCount\u003c/p\u003e\n  ##results\n\u003c/ul\u003e\n```\n\n**Single Result Template**\n\n```html\n\u003cli\u003e\u003ca href=\"##url\"\u003e##title\u003c/a\u003e\u003c/li\u003e\n```\n\n### Variables\n\n| Field Name                | Purpose                                                             |\n| ------------------------- | ------------------------------------------------------------------- |\n| `##title`                 | Post title                                                          |\n| `##url`                   | Post url                                                            |\n| `##primary_tag_name`      | Name of primary tag                                                 |\n| `##primary_tag_url`       | Url of primary tag                                                  |\n| `##primary_author_name`   | Name of primary author                                              |\n| `##primary_author_url`    | Profile url of primary author                                       |\n| `##primary_author_avater` | Profile photo of primary author                                     |\n| `##excerpt`               | show some words of the post content. Default words count is 15      |\n| `##published_at`          | Post publication date. Format can be change by `time_format` option |\n| `##feature_image`         | Post featured image url                                             |\n| `##resultCount`           | Matched result count                                                |\n\n## Logs\n- 3.1.0 - Search on content along with title, Replace [laravel-mix](https://laravel-mix.com/) with [parcel](https://parceljs.org/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FkingRayhan%2Fghost-finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FkingRayhan%2Fghost-finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FkingRayhan%2Fghost-finder/lists"}