Skip to content

The Jekyll Static Assets plugin allows for alternate source and destination paths to be set for static assets in a Jekyll project.

Notifications You must be signed in to change notification settings

Designaroni/jekyll-static-assets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 

Repository files navigation

jekyll-static-assets

Purpose

Jekyll Static Assets accomdates alternate source & destination locations of static assets. Source & Destination folder locations can be defined in a Jekyll project outside of the default assets directories (pre or post compile).

I built this plugin to accomodate the static assets used in jekyll-multisites. In that project it copies static assets from a subfolder to Jekyll's default destination for compiled assets like sass.

Usage

To use the plugin two things need to be in place:

  1. Place the jekyll-static-assets.rb file in the _plugins directory of a jekyll build.
  2. Define source & destination locations in the config yaml file using static_assets_source & static_assets_destination.

Example of it's use as a part of my jekyll-multisites project:

static_assets_source: sites/siteOne/_staticAssets/
static_assets_destination: assets/

2 Gotcha's

  1. Both yaml parameters will be stripped of leading & trailing forward slashes from the path so there is no need to include them in the path except for verbosity.
  2. The static_assets_destination path is relative to the config.yml destination parameter. The static_assets_source is relative to the top level project directory.

Inspiration

Inspiration for this project came from the jekyll-pages-directory

About

The Jekyll Static Assets plugin allows for alternate source and destination paths to be set for static assets in a Jekyll project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages