https://github.com/daviddarnes/jekyll-search-js
🔍 Search through your jekyll pages, posts, or any collection the ES6 way
https://github.com/daviddarnes/jekyll-search-js
hacktoberfest jekyll jekyll-ecosystem npm search
Last synced: about 1 year ago
JSON representation
🔍 Search through your jekyll pages, posts, or any collection the ES6 way
- Host: GitHub
- URL: https://github.com/daviddarnes/jekyll-search-js
- Owner: daviddarnes
- License: mit
- Created: 2017-07-17T11:16:51.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-11-22T19:02:21.000Z (over 5 years ago)
- Last Synced: 2025-03-28T23:43:47.202Z (about 1 year ago)
- Topics: hacktoberfest, jekyll, jekyll-ecosystem, npm, search
- Language: JavaScript
- Homepage: https://daviddarnes.github.io/jekyll-search-js/
- Size: 14.6 KB
- Stars: 28
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# jekyll-search-js
🔍 Search through your jekyll pages, posts, or any collection the ES6 way. [See a demo](https://daviddarnes.github.io/jekyll-search-js/)
[
](https://buymeacoffee.com/daviddarnes#support)
## Installation
1. Download the source files (`src/`) or install with npm
2. Drop these files into your `assets/` directory (or preferred directory)
3. Link the `search.js` file and `fetch.js` polyfill:
``` html
```
4. Initialise a new search:
``` html
// New search using example options
const search = new jekyllSearch(
'https://alembic.darn.es/assets/search.json',
'#search',
'#list',
'https://alembic.darn.es'
);
// Initialise
search.init();
```
## Options
``` js
const search = new jekyllSearch(
'https://alembic.darn.es/assets/search.json', // Your data source, can be relative or absolute
'#search', // The selector of your search input field
'#list', // The selector of your search results wrapper
'https://alembic.darn.es' // Optional site url for absolute urls
);
```
## To do
- [x] Get js into a class
- [x] Allow options to be set
- [x] Finish installation readme
- [x] Add how to be installed using npm
- [ ] Submit to npmjs.com