11ty Serverless Search screenshot

11ty Serverless Search

Author Avatar Theme by 5t3ph
Updated: 28 Aug 2021
28 Stars

An example of using 11ty Serverless to. create site search using local and external data sources.

Categories

Overview:

11ty Serverless Search is an example of how to use 11ty Serverless to create a site search feature. It allows users to search for content within a website using local and external data sources.

Features:

  • Local and External Data: 11ty Serverless Search fetches results from both local and external sources. Local data is generated from an array of post data using a prebuild/prestart Node script. External data is fetched from Stephanie Eckles’ dev.to profile.
  • Custom Collection: The combined custom collection is passed through an 11ty filter to search the content and return search results.
  • Development Scripts: Includes npm scripts for running 11ty with hot reload at localhost:8080 and building the production version with minified, autoprefixed CSS.

Installation:

To install 11ty Serverless Search, follow these steps:

  1. Clone the repository:
git clone <repository_url>
  1. Install the dependencies:
npm install
  1. Start the development server:
npm start
  1. Browse the site at localhost:8080 for hot reload with Sass changes.

  2. Build the production version:

npm run build

Summary:

11ty Serverless Search is an example of using 11ty Serverless to create a site search feature with both local and external data sources. It provides a custom collection and development scripts for easy setup and usage.