A Babel converter for Jekyll.
Based on jekyll-coffeescript by @parkr.
Add this line to your application's Gemfile:
gem 'jekyll-babel'
Then execute:
$ bundle
You may also skip using a Gemfile and install it yourself as:
$ gem install jekyll-babel
Finally, in you Jekyll's _config.yml file, add:
gems:
- jekyll-babel
Notes: jekyll-babel
requires Ruby 1.9.3 or greater. Additionally, the dependency on execjs
means you must also have a valid JavaScript runtime available to your project
In your Jekyll site, create Babel-aware files that start with the following lines:
---
---
You need those three dashes in order for Jekyll to recognize it as "convertible". They won't be included in the content passed to the Babel compiler.
Files with extensions .js, .es6, .babel and .jsx will be processed. You may customize the list of white-listed extensions in your _config.yml, by providing a string of comma-separated values:
babel_js_extensions: 'es6, babel, jsx' # Do not process .js files
http://github.com/thejameskyle/jekyll-babel/fork
)git checkout -b my-new-feature
)git commit -am "Add some feature"
)git push origin my-new-feature
)