New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ghost-finder

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ghost-finder

The most advance ghost search plugin

latest
Source
npmnpm
Version
3.1.2
Version published
Maintainers
1
Created
Source

Ghost Finder

Installation

npm install ghost-finder

OR

download Download Latest Release

Include script

<script src="{{asset "ghost-finder/dist/ghost-finder.js"}}"></script>

Setup markup

<div>
  <input id="search-input" type="text" placeholder="Type to search" />
  <div id="search-result"></div>
</div>

Activate the plugin

new GhostFinder({
    input: '#search-input',
    showResult: '#search-result',
    contentApiKey: //CONTENT API KEY...,
})

To see how you can get contentApiKey , Click Here

Options

NameDefault ValueDetails
inputnull RequiredDOM selector of search input
showResultnull RequiredDOM selector where search result will be pluged-in
homeUrlcurrent website urlYour ghost site url
contentApiKeynull Requiredcontent api key
resultTemplatesee bellowResult wrapper template for search result
singleResultTemplatesee bellowSingle search result template
excerpt_length250word count to show in ##excerpt variable
time_format'MMMM dd yyyy'Time format string for ##published_at variable. Available formats

Default templates

Result Template

<ul class="search-results-wrapper">
  <p>Search match(es): ##resultCount</p>
  ##results
</ul>

Single Result Template

<li><a href="##url">##title</a></li>

Variables

Field NamePurpose
##titlePost title
##urlPost url
##primary_tag_nameName of primary tag
##primary_tag_urlUrl of primary tag
##primary_author_nameName of primary author
##primary_author_urlProfile url of primary author
##primary_author_avaterProfile photo of primary author
##excerptshow some words of the post content. Default words count is 15
##published_atPost publication date. Format can be change by time_format option
##feature_imagePost featured image url
##resultCountMatched result count

Logs

  • 3.1.0 - Search on content along with title, Replace laravel-mix with parcel

Keywords

ghost

FAQs

Package last updated on 06 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts