Let Jekyll convert your Ruby into JavaScript using Opal
Ruby Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
script Suppress warnings. Jun 16, 2014
spec Update spec to be version-flexible. /cc #10. Jun 13, 2016
.gitignore Add ALL THE TESTS YAY Jun 16, 2014
.travis.yml
Gemfile
History.markdown
LICENSE.txt
README.md
Rakefile Initial import. Jun 16, 2014
jekyll-opal.gemspec Allow using versions of Opal beyond 0.8.x (aka 0.9.x) May 4, 2016

README.md

Jekyll-Opal

Let Jekyll convert your Ruby into JavaScript using Opal.

Build Status

Installation

Add this line to your application's Gemfile:

gem 'jekyll-opal'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-opal

Usage

Write your Opal in .opal files (be sure to add the two --- lines at the top to make them pages!!)

This plugin comes with a generator which creates the Opal library file in the destination, under js/opal.js, if it's not already there. To prevent backwards-incompatible sites, we ship a {{ site.opal.url }} variable for your use in your sites. When output, it will look like this: /js/opal.js.

If your site is served in a subfolder (i.e. http://example.org/subfolder/), simply prepend a baseurl:

<script src="{{ site.opal.url | prepend:"my_subfolder" }}"></script>

You can even prepend variables! Perhaps a URL?

<script src="{{ site.opal.url | prepend:"my_subfolder" | prepend:site.url }}"></script>

Feel free to chain them like that -- they're just Liquid filters.

File an issue if something isn't clear!

Contributing

  1. Fork it ( https://github.com/jekyll/jekyll-opal/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

MIT. See the License file for more details