andy-jekyll-search
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.7%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: jdamerow
- Language: Ruby
- Default Branch: master
- Size: 5.86 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Andy - A Lunr Search Generator
This mini plugin provides a generator for Jekyll pages that generators the necessary files to add a Lunr.js search to your site.
Since GitHub pages disable most Jekyll plugins, I wrote this little generator to programmatically add all posts to the Lunr index. The result of the generator are two files: search-index.js and catalog.json that can be used to search the site through Lunr, and display the search results. The basic idea of Andy is that you don't need this plugin on the GitHub pages servers. The plugin generates files locally that you then check in to your GitHub pages repository. As an example see the DigInG Course Book.
Note: this is a very rough first implementation, and this solution might not necessarily scale very well.
Installation
Simply copy the two files in the lib folder andy_generator.rb and search-index.js into the _plugin folder of your Jekyll project.
After you start up Jekyll, you should then find the files search-index.js and catalog.json in /assets/js.
Usage
You can now use Lunr.js as described on their webpage. You can find two templates for a very simple search interface in templates:
- andy_search.js: add this javascript to your Jekyll site. It queries the Lunr index and adds the results to a list.
- search_page.html: this is a very simple search results page.
The javascript in andy_search.js requires a search input field with a search button with specific ids:
<div id="search_div">
Search: <input type="text" id="search_box">
<a data-href="{{site.baseurl}}/search.html" id="search_button"><i class="fa fa-search"></i></a>
</div>
Owner
- Name: Julia Damerow
- Login: jdamerow
- Kind: user
- Repositories: 4
- Profile: https://github.com/jdamerow
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Damerow" given-names: "Julia" title: "Andy - Jekyll Search" version: 1.0.0 doi: 10.5281/zenodo.1234 date-released: 2024-06-17 url: "https://github.com/jdamerow/andy-jekyll-search"
GitHub Events
Total
Last Year
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0