Search by Algolia
5 considerations for Black Friday 2023 readiness
e-commerce

5 considerations for Black Friday 2023 readiness

It’s hard to imagine having to think about Black Friday less than 4 months out from the previous one ...

Piyush Patel

Chief Strategic Business Development Officer

How to increase your sales and ROI with optimized ecommerce merchandising
e-commerce

How to increase your sales and ROI with optimized ecommerce merchandising

What happens if an online shopper arrives on your ecommerce site and: Your navigation provides no obvious or helpful direction ...

Catherine Dee

Search and Discovery writer

Mobile search UX best practices, part 3: Optimizing display of search results
ux

Mobile search UX best practices, part 3: Optimizing display of search results

In part 1 of this blog-post series, we looked at app interface design obstacles in the mobile search experience ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Mobile search UX best practices, part 2: Streamlining search functionality
ux

Mobile search UX best practices, part 2: Streamlining search functionality

In part 1 of this series on mobile UX design, we talked about how designing a successful search user experience ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Mobile search UX best practices, part 1: Understanding the challenges
ux

Mobile search UX best practices, part 1: Understanding the challenges

Welcome to our three-part series on creating winning search UX design for your mobile app! This post identifies developer ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

Teaching English with Zapier and Algolia
engineering

Teaching English with Zapier and Algolia

National No Code Day falls on March 11th in the United States to encourage more people to build things online ...

Alita Leite da Silva

How AI search enables ecommerce companies to boost revenue and cut costs
ai

How AI search enables ecommerce companies to boost revenue and cut costs

Consulting powerhouse McKinsey is bullish on AI. Their forecasting estimates that AI could add around 16 percent to global GDP ...

Michelle Adams

Chief Revenue Officer at Algolia

What is digital product merchandising?
e-commerce

What is digital product merchandising?

How do you sell a product when your customers can’t assess it in person: pick it up, feel what ...

Catherine Dee

Search and Discovery writer

Scaling marketplace search with AI
ai

Scaling marketplace search with AI

It is clear that for online businesses and especially for Marketplaces, content discovery can be especially challenging due to the ...

Bharat Guruprakash

Chief Product Officer

The changing face of digital merchandising
e-commerce

The changing face of digital merchandising

This 2-part feature dives into the transformational journey made by digital merchandising to drive positive ecommerce experiences. Part 1 ...

Reshma Iyer

Director of Product Marketing, Ecommerce

What’s a convolutional neural network and how is it used for image recognition in search?
ai

What’s a convolutional neural network and how is it used for image recognition in search?

A social media user is shown snapshots of people he may know based on face-recognition technology and asked if ...

Catherine Dee

Search and Discovery writer

What’s organizational knowledge and how can you make it accessible to the right people?
product

What’s organizational knowledge and how can you make it accessible to the right people?

How’s your company’s organizational knowledge holding up? In other words, if an employee were to leave, would they ...

Catherine Dee

Search and Discovery writer

Adding trending recommendations to your existing e-commerce store
engineering

Adding trending recommendations to your existing e-commerce store

Recommendations can make or break an online shopping experience. In a world full of endless choices and infinite scrolling, recommendations ...

Ashley Huynh

Ecommerce trends for 2023: Personalization
e-commerce

Ecommerce trends for 2023: Personalization

Algolia sponsored the 2023 Ecommerce Site Search Trends report which was produced and written by Coleman Parkes Research. The report ...

Piyush Patel

Chief Strategic Business Development Officer

10 ways to know it’s fake AI search
ai

10 ways to know it’s fake AI search

You think your search engine really is powered by AI? Well maybe it is… or maybe not.  Here’s a ...

Michelle Adams

Chief Revenue Officer at Algolia

Cosine similarity: what is it and how does it enable effective (and profitable) recommendations?
ai

Cosine similarity: what is it and how does it enable effective (and profitable) recommendations?

You looked at this scarf twice; need matching mittens? How about an expensive down vest? You watched this goofy flick ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

What is cognitive search, and what could it mean for your business?
ai

What is cognitive search, and what could it mean for your business?

“I can’t find it.”  Sadly, this conclusion is often still part of the modern enterprise search experience. But ...

Vincent Caruana

Sr. SEO Web Digital Marketing Manager

How neural hashing can unleash the full potential of AI retrieval
ai

How neural hashing can unleash the full potential of AI retrieval

Search can feel both simple and complicated at the same time. Searching on Google is simple, and the results are ...

Bharat Guruprakash

Chief Product Officer

Looking for something?

Add instant search to your blog or documentation using our Jekyll plugin

Jul 22nd 2015 engineering

Add instant search to your blog or documentation using our Jekyll plugin
facebookfacebooklinkedinlinkedintwittertwittermailmail

Our goal at Algolia is to provide the fastest and the most relevant search experience everywhere around the world. In order to reach this scale, making the life of developers easier had to be one of our founding values. That’s why you can find clients for our API for many languages and frameworks.

Today we are proud to announce the new born in our family of integrations: the Jekyll plugin.

What is Jekyll

Jekyll is a static website generator. You write your content as markdown files, create a few layout templates and it generates the whole HTML website for you. You can then easily deploy it on any web server as it does not need any backend language or database to operate.

Jekyll itself is written in Ruby and is mostly used for blogs or documentation websites. GitHub actually provides a feature called GitHub pages that will automatically build and host a Jekyll website for you if you push it to a branch named gh-pages.

How to use the plugin

As a Jekyll website is only static HTML files, it also means that you cannot have any search capabilities. Or at least you couldn’t until now. With Algolia’s plugin, you now have access to the jekyll algolia push command. It will scan your Jekyll website and push every paragraph of text as a new record to an Algolia index so that you can search it from your website.

Screencast of the search in action
You can see it in action here.

 

This fully tested plugin is available from rubygems and you can easily install it by adding just one line to your Gemfile. Once installed, you only need to edit your _config.yml to add your credentials. All information regarding installation and configuration are available in the readme.

Algolia Jekyll Plugin Badges

How it works

The plugin looks at the HTML files generated by the jekyll build command and extracts every <p> paragraphs of text from them. It then adds a bit of metadata context to each of them and pushes them to your index.

By reading the final HTML pages that are generated, we do not rely on any specific markdown parser and you can even use any custom plugin you’d like.

For each extracted paragraph, we index its raw HTML value as well as its sanitized text. We also include the page url, the full hierarchy of headings (h1 to h6) where the paragraph was found and a few other informations (like a unique CSS selector for the <p> as well as its closest parent heading).

All this information will let you display nice search results and even point the user to the exact matched <p> in the results page. By default, results are grouped by urls, meaning that only the most relevant paragraph of each page will be returned, but this can be changed from the settings (as we’ll see in the next section).

Note that by itself, the plugin only imports your data to your index. For rendering the results, you can follow our tutorials or use our forked version of the popular Hyde theme.

Advanced usage

The default settings are perfectly tuned for a blog, but if you have a different kind of content, you might want to tweak the plugin configuration to fit your needs.

Fortunately, the plugin is highly configurable. First of all, if you want to index more than just <p> paragraphs (maybe you would like headings and block quotes as well), you can define your own CSS selectors.

Next, all the Algolia index settings are overridable directly from the _config.yml file, allowing you to group results based on another attribute, add snippeting to your fields or define your own custom ranking rules.

Finally, we also provide custom hooks that let you write custom code to add your own attributes to your records or add/remove records right before pushing them.

Our goal is to give you as much freedom as possible when using this plugin. We can’t wait to see what you’re going to build with it.

About the author
Tim Carry

githubtwitter

Algolia documentation

It's extensive, clear, and, of course, searchable

Read the docs
Algolia documentation

Recommended Articles

Powered byAlgolia Algolia Recommend

New Features, New Docs and a New Foundation for Algolia’s Jekyll Plugin
engineering

Tim Carry

Supercharging WordPress so that everyone can have great search!
product

Raymond Rutjes

Software Engineer

Good API Documentation Is Not About Choosing the Right Tool
engineering

Maxime Locqueville

DX Engineering Manager