GithubHelp home page GithubHelp logo

designaroni / jekyll-static-assets Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 10 KB

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

Ruby 100.00%
jekyll jekyll-plugin jekyll-static-assets jekyll-assets jekyll-multisites jekyll-snippets ruby

jekyll-static-assets's Introduction

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

jekyll-static-assets's People

Contributors

designaroni avatar

Stargazers

 avatar  avatar

Watchers

 avatar

jekyll-static-assets's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.