Jekyll is a static site generator. It takes text written in your favorite markup language and uses layouts to create a static website. You can tweak the site’s look and feel, URLs, the data displayed on the page, and more.
Create your Jekyll site
If you don’t have an existing Jekyll site, you can create one by running:
Bash
1gem install bundler jekyll2jekyll new my-jekyll-site3cd my-jekyll-site
Add Edgio
Bash
1# First, globally install the Edgio CLI:2npm i -g @edgio/cli # yarn global add @edgio/cli3# Next, create a stub package.json:4npm init5# Then, add Edgio to your Jekyll site:6edgio init
Update your Edgio Router
Paste the following into routes.js
:
JavaScript
1import { Router } from '@edgio/core'23const ONE_DAY = 60 * 60 * 244const FAR_FUTURE = ONE_DAY * 365 * 1056export default new Router()7 // Create serveStatic route for each file in the folder _site with a cache-control header of 's-maxage=315360000'8 .static('_site')
Deploying
Deploy your app to the Sites by running the following commands in your project’s root directory:
Bash
1# Create a production build of your Jekyll site2bundle exec jekyll build34# Deploy it to Sites5edgio deploy