CoffeeScript compilation broken with Jekyll 3.0 #4129

Closed
perlun opened this Issue Nov 11, 2015 · 4 comments

Comments

Projects
None yet
6 participants
@perlun

perlun commented Nov 11, 2015

Unfortunately, I can't come to any other conclusion.

If I create a file named foo.coffee in the root folder of my project, and give it the following content:

---

---

a = () -> 'bar'

...and then run jekyll build, the result is not the expected one. The file is copied more-or-less verbatim into the _site folder. But the front matter is removed, i.e. the first lines with three dashes (which is the suggested approach in the documentation), and the result is this:

a = () -> 'bar'

Que? 😄

My local environment:

$ jekyll --version
jekyll 3.0.0
$ uname -a
Darwin ECVAAWPLUN5.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64
$ ruby -v
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
$ coffee -v
CoffeeScript version 1.10.0
@envygeeks

This comment has been minimized.

Show comment
Hide comment
@envygeeks

envygeeks Nov 11, 2015

Contributor

Did you install jekyll-coffeescript which is not included by default in Jekyll 3.0 anymore.

Contributor

envygeeks commented Nov 11, 2015

Did you install jekyll-coffeescript which is not included by default in Jekyll 3.0 anymore.

@lennyjpg

This comment has been minimized.

Show comment
Hide comment
@lennyjpg

lennyjpg Nov 11, 2015

gems: [jekyll-coffeescript]

at the end of _config.yml fixed this for me.

gems: [jekyll-coffeescript]

at the end of _config.yml fixed this for me.

@perlun

This comment has been minimized.

Show comment
Hide comment
@perlun

perlun Nov 13, 2015

Adding jekyll-coffeescript to my Gemfile and running bundle install didn't help. However, doing that and also adding it to the list of gems in the_config.yml` did the. Thanks!

I guess we should add this to the docs then? Right now, they are actually rather misleading:

Jekyll provides built-in support for Sass and CoffeeScript. In order to use them, create a file with the proper extension name (one of .sass, .scss, or .coffee) and start the file with two lines of triple dashes, like this:

It doesn't say anything whatsoever about extra gems being needed. So we should definitely fix them if this is the expected behavior.

perlun commented Nov 13, 2015

Adding jekyll-coffeescript to my Gemfile and running bundle install didn't help. However, doing that and also adding it to the list of gems in the_config.yml` did the. Thanks!

I guess we should add this to the docs then? Right now, they are actually rather misleading:

Jekyll provides built-in support for Sass and CoffeeScript. In order to use them, create a file with the proper extension name (one of .sass, .scss, or .coffee) and start the file with two lines of triple dashes, like this:

It doesn't say anything whatsoever about extra gems being needed. So we should definitely fix them if this is the expected behavior.

@Lewiscowles1986

This comment has been minimized.

Show comment
Hide comment

envygeeks added a commit that referenced this issue Nov 14, 2015

@parkr parkr closed this Nov 14, 2015

envygeeks added a commit that referenced this issue Nov 15, 2015

Merge pull request #4142 from Lewiscowles1986/patch-3
updated to reflect further feedback on #4129

@jekyll jekyll locked and limited conversation to collaborators Feb 27, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.