Code Monkey home page Code Monkey logo

generator-jekyllrb's People

Contributors

alejandroiglesias avatar amitaibu avatar bitdeli-chef avatar bval avatar caseyg1204 avatar d-land avatar davidliu314 avatar devantoine avatar dnozay avatar gjeck avatar johnfmorton avatar kevva avatar kuatsure avatar lubomirgeorgiev avatar microcosm avatar nick-thompson avatar palominoz avatar rileyjshaw avatar robwierzbowski avatar sindresorhus avatar tobynet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generator-jekyllrb's Issues

How to make the browser not automatically open on grunt serve

I have a kind of silly problem. I'm running all my development on a VMware virtual machine (Debian) and every time I run grunt serve it open up Iceweasel on the VM, which is both annoying and not needed as I'm viewing it from my host machine. I've looked through the Gruntfile.js but I haven't been able to spot where it automatically makes the browser start. Any way to disable this?

grunt check failure

I keep getting CSSCSS failures when running grunt check on sass imports that are importing compass plugins (doesn't matter what compass plugin it is but breakpoint is shown in the screen shot) is this a configuration issue, an incorrectly set option in CSSCSS, or am I just using Sass incorrectly. Any clarity on the issue would be most appreciated.

screen shot 2013-12-04 at 12 52 44 am

Npm install fails on Windows fix

@patrickgrey posted in another issue:

I can only run npm install if I add

"jpegtran-bin": "0.2.0",
before
"grunt-contrib-imagemin": "~0.2.0",
in package.json as suggested in gruntjs/grunt-contrib-imagemin#108

That issue needs to be dealt with in the upstream libraries, but in the interim Windows users can follow these steps:

  1. Run yo jekyllrb --skip-install to scaffold a Yeoman-Jekyll app.
  2. Open package.json and add "jpegtran-bin": "0.2.0" above "grunt-contrib-imagemin": "~0.2.0",
  3. Run npm install && bower install && bundle install

Generation failed

I'm trying to use the generator but it failed during generation. I'm performing generation in this directory:

<<MY_USER_DIR>>\Documents\Projects\mysite

and I overrode during setup the "css" directory to "stylesheets". During generation I got this error:

fs.js:338
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '<<MY_USER_DIR>>\app\stylesheets\main.css'
    at Object.fs.openSync (fs.js:338:18)
    at Object.fs.readFileSync (fs.js:182:15)
    at Generator.copy (<<MY_USER_DIR>>\node_modules\generator-jekyllrb\node_modules\yeoman-generator\lib\actions\actions.js:75:15)
    at Generator.cssPreprocessor (<<MY_USER_DIR>>\node_modules\generator-jekyllrb\app\index.js:565:12)
    at Array.forEach (native)
    at Generator.cssPreprocessor (<<MY_USER_DIR>>\node_modules\generator-jekyllrb\app\index.js:564:11)
    at next (<<MY_USER_DIR>>\node_modules\generator-jekyllrb\node_modules\yeoman-generator\lib\base.js:285:18)
    at Base.run (<<MY_USER_DIR>>\node_modules\generator-jekyllrb\node_modules\yeoman-generator\lib\base.js:296:7)
    at next (<<MY_USER_DIR>>\node_modules\generator-jekyllrb\node_modules\yeoman-generator\lib\util\conflicter.js:51:14)
    at conflicter.resolve (<<MY_USER_DIR>>\node_modules\generator-jekyllrb\node_modules\yeoman-generator\lib\util\conflicter.js:60:7)

Tue 05/28/2013  1:57:00.39

So it should be looking in

<<MY_USER_DIR>>\Documents\Projects\mysite\app\stylesheets\main.css

which absolutely exists. Instead, instead it's looking in

<<MY_USER_DIR>>\app\stylesheets\main.css

which obviously doesn't exist.

The backslashes are intentional btw: I'm on Windows.

Don't hardcode asset paths

I think we would have more power if you put asset paths in the configuration, along the lines of:

# ...
yeoman:
  app: "app"
  dist: "dist"
  css: "css"
  js: "js"
  img: "img"
  fonts: "fonts"
  sass: "_scss"
  coffee: "_src"
# ...

(This is CoffeeScript.) This way we could easily change those paths later, use them e.g. for some Jekyll plugins like jekyll-assets etc.

What do you think?

Pygments code highlighting on windows = blank HTML

I previously said HTML5 Boilerplate wasn't working. Ignore, I think I was installing incorrectly.
However, there is a problem with Pygments code highlighting on windows.
I run either the Jekyll or HTML5 templates without Pygments code highlighting and they run fine (apart from issues identified already).
With Pygments code highlighting, both fail.
Symptom, on grunt serve, the html files in the .jekyll directory contain no code, nothing.
No errors are raised in the console.

For all the tests I included:
compass
Autoprefixer
No JS preprocessor
date permalink
redcarpet

I tried to run a few grunt commands to get some errors but only some gave errors:

$ grunt jekyll
Running "jekyll:dist" (jekyll) task
`bundle exec jekyll build --source app --destination dist --config _config.yml,_
config.build.yml` was initiated.

Jekyll output:
Configuration file: _config.yml
Configuration file: _config.build.yml
        Source: app
   Destination: dist
  Generating... done.
Running "jekyll:server" (jekyll) task
`bundle exec jekyll build --source app --destination .jekyll --config _config.ym
l` was initiated.
Jekyll output:
Configuration file: _config.yml
        Source: app
   Destination: .jekyll
  Generating... done.
Running "jekyll:check" (jekyll) task
`bundle exec jekyll doctor` was initiated.
Jekyll output:
Configuration file: d:/Offline/testing/2013/jekyll/jekyllHighlight/_config.yml
Warning: Command failed: error: No such file or directory - .. Use --trace to vi
ew backtrace
 Use --force to continue.
Aborted due to warnings.

and

$ jekyll doctor
Configuration file: d:/Offline/testing/2013/jekyll/boilerplateHighlightTest/_con
fig.yml
error: No such file or directory - d:/Offline/testing/2013/jekyll/boilerplateHig
hlightTest/node_modules/grunt-contrib-        imagemin/node_modules/gifsicle/node_module
s/bin-    wrapper/node_modules/download/node_modules/decompress/node_modules/adm-    zip
/test/assets/attributes_test/New folder/hidden_readonly.txt. Use --trace to view
 backtrace

Simplify setup by removing github and twitter prompts

Right now the generator asks the user for their github and twitter names and inserts them into humans.txt and the default Jekyll layout. There's some code to smartly get the github user name from .gitconfig behind the scenes too.

I have the suspicion that few people roll with the default Jekyll template, and I don't think the convenience of automatic insertion of user names is greater than the annoyance of entering them when scaffolding, so I'm going to remove them.

Error in watch after editing post on Windows

I just recently installed generator-jekyllrb under Windows 7. The generator completes normally.

Note: I'm running Ruby 2.0.0p247

When running the server with "grunt server", the server starts and I can see my posts. But when I edit or add a post (html or md), an error occurs:

Running "watch" task
Waiting...OK
>> File "app\_posts\2013-10-01-instructions.md" changed.

Running "jekyll:server" (jekyll) task
`bundle exec jekyll build --source app --destination .jekyll --config _config.ym
l` was initiated.
D:\Public\jekyll-yo\node_modules\grunt-contrib-compass\node_modules\tmp\lib\tmp.js:261
  throw err;
        ^
Error: watch EPERM
    at errnoException (fs.js:806:11)
    at FSEvent._handle.onchange (fs.js:824:26)

D:\Public\jekyll-yo>

Jekyll output:
Configuration file: _config.yml
            Source: app
       Destination: .jekyll
      Generating... done.

Done, without errors.

Elapsed time
jekyll:server  2s
Total          2s

Editing a SCSS file updates and livereloads properly.

So far, I have noticed that when I disable the reloading by commenting out (in the Gruntfile.js) the "jekyll" part of the watch, it doesn't occur.

It also doesn't occur when I comment the dest in jekyll/server/options in de Gruntfile, although then the server doesn't work correctly anymore.

I plan to take more of a look into it, but I'm unfamiliar with grunt, yo and jekyll, so maybe someone has some ideas.

Placing assets in subdirectories breaks LiveReload

TL;DR

Jekyll's exclude option in _config.yml doesn't appear to accept subdirectories.

Details

The default configuration for the JavaScript directory is js. If during the configuration you choose to place it in a subdirectory, say assets/js, it breaks the LiveReload of the JavaScript.

From my testing, it seems that Jekyll's _config.yml exclude option does not accept paths to subdirectories. You may only pass file or folder names. Jekyll is ignoring requests to exclude assets/js and the JavaScript (and any other asset in a subdirectory) is copied to the .jekyll directory. The server looks in the .jekyll directory for assets prior to looking in app.

This isn't an issue when using CoffeeScript compilation as the CoffeeScript files are compiled into .tmp. The server looks in .tmp before looking into .jekyll or app, so it ignores the fact that the JavaScript files are in .jekyll. Note: I haven't tested it, but I'm would imagine this would happen with CSS v Sass as well.

Possible Solutions

  1. Ask the user if they would like to place all the assets in a subdirectory. If they provide a directory to place all the assets, then add that directory to the exclude array rather than each asset directory.
  2. Copy the JavaScript from app to .tmp on save, as the server would look there first.
  3. Not allow subdirectories for assets. ๐Ÿ˜ฆ

Thoughts?

Create subgenerator for common jekyll tasks

I'll probably PR this eventually but just wanted to throw it in here to see if there was any interest. Thinking something like yo jekyllrb:post to spin up a new post yo jekyllrb:page for a new page.

This thing is awesome for initial generation (THANK YOU), can probably help spin up pages too.

Generator fails, no such file or directory '.../app/css/main.css'

Installing and running generator-jekyllrb for the first time

fs.js:684
  return binding.stat(pathModule._makeLong(path));
                 ^
Error: ENOENT, no such file or directory '/Users/paulodeon/yeomantest4/app/css/main.css'
    at Object.fs.statSync (fs.js:684:18)
    at Generator.<anonymous> (/usr/local/share/npm/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/actions/actions.js:97:16)
    at EventEmitter.g (events.js:175:14)
    at EventEmitter.emit (events.js:95:17)
    at /usr/local/share/npm/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/util/conflicter.js:59:18
    at EventEmitter.collision (/usr/local/share/npm/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/util/conflicter.js:140:12)
    at next (/usr/local/share/npm/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/util/conflicter.js:54:16)
    at /usr/local/share/npm/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/util/conflicter.js:60:7
    at EventEmitter.collision (/usr/local/share/npm/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/util/conflicter.js:140:12)
    at next (/usr/local/share/npm/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/util/conflicter.js:54:16)

Here are the config options selected:

Tell us a little about yourself. โ˜›
[?] Name: (Paul Odeon) 
[?] Email: ([email protected]) 
[?] GitHub Username: (paulodeon) 
[?] Twitter Username: (@paulodeon) 

Wire tools and preprocessors. โ˜›
[?] Use a css preprocessor?
 s: sass
 c: compass
 n: none (n) s
[?] Use Autoprefixer? (Y/n) Y
[?] Use a javascript preprocessor?
 c: coffeescript
 n: none (n) 

Set up some directories. โ˜›
Nested directories are fine.
[?] Choose a css directory: (css) 
[?] Choose a javascript directory: (js) 
[?] Choose an image file directory: (image) 
[?] Choose a webfonts directory: (fonts) 
[?] Choose a css preprocessor directory: (_scss) 

Choose a template. โ˜›
[?] Choose a Jekyll site template
 d: default
 h5: HTML5 โ˜… Boilerplate (d) h5
[?] Add H5โ˜…BP css files (Y/n) y
[?] Add H5โ˜…BP javascript files? (Y/n) y
[?] Add H5โ˜…BP favorite and touch icons? (Y/n) y
[?] Add H5โ˜…BP documentation? (y/N) y
[?] Include Google Analytics? (Y/n) y

And configure Jekyll. โ˜›
You can change all of these options in Jekyll's _config.yml.
[?] Site Description: Site
[?] Choose a post permalink style
 d: date
 p: pretty
 n: none (d) 
[?] Markdown library
 m: maruku
 rd: rdiscount
 k: kramdown
 rc: redcarpet (m) 
[?] Use the Pygments code highlighting library? (Y/n) 
[?] Enable pagination? (Number of posts, or 'all') 

Provide "incremental build" using grunt

With the risk of being "out of scope" for this repo:

  • Jekyll takes long time to regenerate content on big sites
  • Incremental build isn't something that is expected to happen any time soon, but it's still needed
  • since we use grunt, we already have a smart build tool in place. We could have a new incremental folder, that on grunt grunt build:incremental will build only that folder, and move it to the existing dist folder.
root
|
|-- app
|-- incremental <-- that's the new folder
|-- dist

Is my idea clear? Do you think/ agree it make sense to have it in this project?

Add grunt-bower install

Following generator-webapp, and also because it's pretty awesome. Less useful outside a js application though, so lower priority.

Error in HTML files after "grunt build"

When I run grunt build to get the layout files compiled, the resultant HTML files have tags ID and classes attributes without double quotes

Here's an example:

<div class=container><div class=site><div class=header>

how to upload this on hosting server (.htaccess) ?

Hi,

By the title it sounds strange, but let me just clarify.I have a working setup. However, anytime I do a grunt build in terminal command, I successfully get an output of everything I need in a folder called dist. The problem I'm having is when I deploy this to a live server. The static pages, don't seem to have the correct permalinks, and the asset files aren't being included correctly for some reason. This only seems to work if I have it running on grunt serve:dist, which opens up a new local server of its own. My question is, how do I make the dist folder work like a local server on my hosting account. I know .htaccess would solve the issue, but I was hoping jekyllrb would generate something like that for me?

If anyone can help, it will be very appreciated!

Gruntfile.js is invalid in 0.2.0

I'm seeing an extra closing curly brace in version 0.2.0 that you just pushed. It's the closing brace for Copy that is doubled (so before rev task).

If you can't reproduce it just let me know and I'll tell you exactly what options I'm selecting for the generator.

Thanks!

Yeoman 1.0 upgrade โ€”ย bold error?

Since upgrading Yeoman to v1.0, I'm getting the following error:

TypeError: Cannot read property 'bold' of undefined
    at Object.<anonymous>...

have already tried npm cache clean...similar problem here suggested filing an issue with generator author.

Thanks for your work on generator-jekyllrb

Keep Stylus?

I added Stylus support to the generator, but it does complicate templating the Gruntfile. As a Sass user I don't have the opportunity to test Stylus as deeply or as often as Sass and Compass, so it has a higher chance of breaking in the future.

Please drop a +1 if you'd like to keep Stylus in the generator. If there's interest I'll keep it in, but if no one uses it I'll remove.

livereload 'too many open files'

When running the grunt server using Compass, I get 'Warning: EMFILE, too many open files '.jekyll'' Commenting out livereload seems to fix this. Possibly watching a directory I shouldn't?

Deployment options

The generator needs bult-in deployment commands, or some recommended deployment options in the readme. This issue expands #3 to include a discussion of all deployment options.

People will want to deploy to

  • Github pages
  • A personal webserver
  • A cloud service like S3 or Heroku

People will want to deploy by

  • Committing their dist folder to git
  • A command line command

We can create automated deployment with

We are only uploading/pushing the compiled contents of the dist folder (even to Github pages โ€” the generator's build magic needs Yeoman/Grunt, and can't happen on Github's servers).

Questions

Should the generator set up a deployment task out of the box? Which? More than one?
Does anyone have good experiences with a node/grunt ftp/rsync/push task we could use?
Any preferences on deployment workflow?

grunt serve crashes on file change

I've generated a brand new project with yo jekyllrb and then ran grunt serve, everything is good, but as soon as I modify a file and save, the serve task is killed and this is what I see

Running "connect:livereload" (connect) task
Started connect web server on 127.0.0.1:9000.

Running "watch" task
Waiting...Bus error: 10

Ruby >=1.9 dependency

because this generator uses csscss ~>1.3.1, which depends on ruby >=1.9, i had troubles with the default MacOSX (10.8.3) ruby installation. The ruby version on 10.8.3 is:

$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

As long as yeoman tries to solve many issues for a wide group of developers, a lot could get in trouble with this. So what could that solve? Downgrade csscss to a lower version?

dist directory fails to load resources

Within the processed dist/ directory, - js, css, and img resources are appropriately concat / minified / uglified / and revved by usemin. They are also linked appropriately within index.html. However, these files fail to load. haven't been able to figure out why.

Follow generator-webapp

Hi,

I am pretty sure you are doing a great job. But I'm wondering if you don't lose time by redoing a lot of work done in the generator-webapp.
Would it be possible to fork it and to directly integrate jekyll? That way you would have the dist you were looking for and so on...

I really need to study generators and packages a lot... But would it be possible to have like a bower install jekyll? Which will integrate in the webapp generator?

Best regards,
Looking forward to work with you or contributing in the generator-webapp.

yo jekyllrb : failed

Config:

  • Platform : Linux 3.9.10-100.fc17.i686 #1 SMP (on virtualbox)
  • ruby --version: ruby 1.9.3p448 (2013-06-27 revision 41675) [i386-linux]
  • node --version : v0.10.22
  • npm --version : 1.3.14
  • gem --version : 1.8.25
  • gem list --local:
    • bundler (1.3.5)
    • jekyll (1.3.1)
    • json (1.8.1, 1.6.8)
    • ....

Install the generator:

  • npm install -g generator-jekyllrb : OK
  • yo jekyllrb : FAILED

When new site generation:
Wire tools and preprocessors. โ˜›
[?] CSS preprocessor: Sass
[?] Use Autoprefixer? Yes
[?] Javascript preprocessor: None

Set up some directories. โ˜›
Nested directories are fine.
[?] CSS directory: css
[?] Javascript directory: js
[?] Image directory: img
[?] Webfont directory: fonts
[?] CSS preprocessor directory: _scss

Choose a template. โ˜›
[?] Site template: HTML5 โ˜… Boilerplate
[?] Add H5โ˜…BP CSS files? Yes
[?] Add H5โ˜…BP javascript files? Yes
[?] Add H5โ˜…BP favorite and touch icons? Yes
[?] Add H5โ˜…BP documentation? Yes
[?] Include Google Analytics? Yes

Choose deployment options. โ˜›
[?] Use grunt-build-control for deployment? Yes
[?] Remote to deploy to: ../
[?] Branch to deploy to: gh-pages

And finally, configure Jekyll. โ˜›
You can change all of these options in _config.yml.
[?] Site description: XXX
[?] Post permalink style: none
[?] Markdown library: redcarpet
[?] Use the Pygments code highlighting library? Yes
[?] Number of posts to show on the home page: all
create .gitignore
create .gitattributes
create Gruntfile.js
create package.json
create .bowerrc
create bower.json
create Gemfile
create .jshintrc
create .csslintrc
create .editorconfig
/home/lo/.gem/ruby/1.9.1/gems/commander-4.1.5/lib/commander/runner.rb:365:in block in require_program': program version required (Commander::Runner::CommandError) from /home/lo/.gem/ruby/1.9.1/gems/commander-4.1.5/lib/commander/runner.rb:364:ineach'
from /home/lo/.gem/ruby/1.9.1/gems/commander-4.1.5/lib/commander/runner.rb:364:in require_program' from /home/lo/.gem/ruby/1.9.1/gems/commander-4.1.5/lib/commander/runner.rb:52:inrun!'
from /home/lo/.gem/ruby/1.9.1/gems/commander-4.1.5/lib/commander/delegates.rb:11:in run!' from /home/lo/.gem/ruby/1.9.1/gems/commander-4.1.5/lib/commander/import.rb:10:inblock in <top (required)>'
/home/lo/.gem/ruby/1.9.1/gems/jekyll-1.3.1/lib/jekyll/filters.rb:2:in require': cannot load such file -- json (LoadError) from /home/lo/.gem/ruby/1.9.1/gems/jekyll-1.3.1/lib/jekyll/filters.rb:2:in<top (required)>'
from /home/lo/.gem/ruby/1.9.1/gems/jekyll-1.3.1/lib/jekyll.rb:43:in require' from /home/lo/.gem/ruby/1.9.1/gems/jekyll-1.3.1/lib/jekyll.rb:43:in<top (required)>'
from /home/lo/.gem/ruby/1.9.1/gems/jekyll-1.3.1/bin/jekyll:7:in require' from /home/lo/.gem/ruby/1.9.1/gems/jekyll-1.3.1/bin/jekyll:7:in<top (required)>'
from /home/lo/bin/jekyll:23:in load' from /home/lo/bin/jekyll:23:in

'

fs.js:427
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT, no such file or directory '/home/lo/Devel/yo-jekyllrb/.jekyll/_posts/2013-12-05-welcome-to-jekyll.markdown'
at Object.fs.openSync (fs.js:427:18)
at Object.fs.readFileSync (fs.js:284:15)
at Generator.copy (/usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/actions/actions.js:102:13)
at Generator.templates (/usr/local/lib/node_modules/generator-jekyllrb/app/index.js:394:8)
at /usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/base.js:290:20
at /usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/node_modules/async/lib/async.js:548:21
at /usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/node_modules/async/lib/async.js:224:13
at iterate (/usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/node_modules/async/lib/async.js:131:13)
at /usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/node_modules/async/lib/async.js:142:25
at /usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/node_modules/async/lib/async.js:226:17

Hi,

I am not a ruby or node expert so it can be something obvious...

The only thing that I see but that's probably ok is that I got ruby/1.9.1/gems and ruby version 1.9.3p448 but I can't find a way to do otherwise...

Any idea ??

Thanks

'server' task doesn't work on Windows

When I run the 'server' task, everything looks fine in the console but the page never loads. Chrome just sits there with the page loading forever.

This is an out-of-the-box issue and is at least affecting Chrome/IE10 + Windows.

I've never used connect-livereload before, but grunt-contrib-livereload works fine for me. I'll have to investigate further to see what the issue is, as a cursory glance at the internet hasn't turned anything up.

Using values from the _config.yml

We can load the _config.yml as a json object in the gruntfile with js-yaml and the following code:

grunt = require('grunt');
var jekyllConfig = require("js-yaml").safeLoad(grunt.file.read('_config.yml'));
console.log(jekyllConfig); // Prints _config.yml, jsonified

I initially wanted this to load the value of keep_files into an exclude list in the Grunt clean task, but there are a couple of shortcomings to this approach:

  1. Only reads the actual values in the _config.yml. Doesn't know anything about Jekyll defaults.
  2. Doesn't know about multiple configuration files listed in the Grunt task.
  3. Doesn't know about config files added programmatically in plugins like Jekyll Picture Tag.

Not sure if there's a benefit > work + complexity solution to this.

Too many open files when you have 200+ blog posts

First props for this generator, it's very well done. I've been looking for a good Jekyll + Sass + Livereload setup and this does the trick.

With one of my sites I have an issue - the Grunt workflow runs fine when it's a small site with 30 blog posts but when I add the actual amount of blog posts (200) in _posts I get this terminal output:

Running "watch" task
Waiting...
Warning: EMFILE: Too many opened files.

Running "watch" task
Waiting...
Warning: EMFILE, too many open files '.jekyll'

Running "watch" task
Waiting...
Warning: EMFILE, too many open files '.jekyll'

Running "watch" task
Waiting...
Warning: EMFILE, too many open files '.jekyll'

And then it goes on to loop the same result. I tried googling the warning and it seems related to having too many files open. Any ideas on how to resolve this issue?

Grunt fails to copy css and js files from app to dist

When running the generator with default options for a Jekyll or HTML5 Boilerplate template I keep getting empty css and js files in dist when running grunt build. I'm not 100% sure where the failure is but it seems as if the files from app are not being copied to dist before concatenation. As a temporary fix I commented the exclude block from _config.yml.

The versions for my machine are:
OS X 10.7.5
bundle exec jekyll -v : jekyll 1.1.2
node -v : v0.10.13

I've added the output from grunt build if it helps:

grunt build
Running "clean:dist" (clean) task

Running "jekyll:dist" (jekyll) task
`bundle exec jekyll build --source app --destination dist --config _config.yml,_config.build.yml` was initiated.

Jekyll output:
Configuration file: _config.yml
Configuration file: _config.build.yml
            Source: app
       Destination: dist
      Generating... done.

Running "concurrent:dist" (concurrent) task

    Running "copy:dist" (copy) task
    Copied 7 files

    Done, without errors.

Running "useminPrepare:html" (useminPrepare) task
Going through dist/index.html to update the config
Looking for build script HTML comment blocks

Found a block:
    <!-- build:css /css/main.css -->
    <link rel="stylesheet" href="/css/normalize.css">
    <link rel="stylesheet" href="/css/syntax.css">
    <link rel="stylesheet" href="/css/main.css">
    <!-- endbuild -->
Updating config with the following assets:
    - dist/css/normalize.css
    - dist/css/syntax.css
    - dist/css/main.css

Found a block:
    <!-- build:js /js/head-scripts.js -->
    <!-- Replace with a custom modernizer build for production -->
    <script src="_bower_components/modernizr/modernizr.js"></script>
    <!-- endbuild -->
Updating config with the following assets:
    - dist/_bower_components/modernizr/modernizr.js

Found a block:
<!-- build:js /js/script.js -->
<script src="/js/plugins.js"></script>
<script src="/js/main.js"></script>
<!-- endbuild -->
Updating config with the following assets:
    - dist/js/plugins.js
    - dist/js/main.js

Configuration is now:

  cssmin:
  { dist: { options: { report: 'gzip' } },
  'dist/css/main.css': 'dist/css/main.css' }

  concat:
  { 'dist/css/main.css': 
   [ 'dist/css/normalize.css',
     'dist/css/syntax.css',
     'dist/css/main.css' ],
  'dist/js/head-scripts.js': [ 'dist/_bower_components/modernizr/modernizr.js' ],
  'dist/js/script.js': [ 'dist/js/plugins.js', 'dist/js/main.js' ] }

  uglify:
  { 'dist/js/head-scripts.js': 'dist/js/head-scripts.js',
  'dist/js/script.js': 'dist/js/script.js' }

  requirejs:
  {}

Running "concat:dist/css/main.css" (concat) task
File "dist/css/main.css" created.

Running "concat:dist/js/head-scripts.js" (concat) task
File "dist/js/head-scripts.js" created.

Running "concat:dist/js/script.js" (concat) task
File "dist/js/script.js" created.

Running "cssmin:dist" (cssmin) task

Running "cssmin:dist/css/main.css" (cssmin) task
>> Destination not written because minified CSS was empty.

Running "uglify:dist/js/head-scripts.js" (uglify) task
File "dist/js/head-scripts.js" created.

Running "uglify:dist/js/script.js" (uglify) task
File "dist/js/script.js" created.

Running "imagemin:dist" (imagemin) task
โœ” dist/apple-touch-icon-precomposed.png (already optimized)
โœ” dist/apple-touch-icon-72x72-precomposed.png (already optimized)
โœ” dist/apple-touch-icon-57x57-precomposed.png (already optimized)
โœ” dist/apple-touch-icon-114x114-precomposed.png (already optimized)
โœ” dist/apple-touch-icon.png (already optimized)
โœ” dist/apple-touch-icon-144x144-precomposed.png (already optimized)

Running "svgmin:dist" (svgmin) task

Running "rev:dist" (rev) task
dist/js/head-scripts.js >> d41d.head-scripts.js
dist/js/script.js >> d41d.script.js
dist/css/main.css >> d41d.main.css

Running "usemin:html" (usemin) task

Processing as HTML - dist/404.html
Update the HTML to reference our concat/min/revved script files
Update the HTML with the new css filenames
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with the data tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input

Processing as HTML - dist/index.html
Update the HTML to reference our concat/min/revved script files
<script src="/js/head-scripts.js" changed to <script src="/js/d41d.head-scripts.js"
<script src="/js/script.js" changed to <script src="/js/d41d.script.js"
Update the HTML with the new css filenames
<link rel="stylesheet" href="/css/main.css" changed to <link rel="stylesheet" href="/css/d41d.main.css"
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with the data tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input

Processing as HTML - dist/jekyll/update/2013/07/30/welcome-to-jekyll.html
Update the HTML to reference our concat/min/revved script files
<script src="/js/head-scripts.js" changed to <script src="/js/d41d.head-scripts.js"
<script src="/js/script.js" changed to <script src="/js/d41d.script.js"
Update the HTML with the new css filenames
<link rel="stylesheet" href="/css/main.css" changed to <link rel="stylesheet" href="/css/d41d.main.css"
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with the data tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input

Processing as HTML - dist/jekyll/update/2013/07/30/yo-jekyllrb.html
Update the HTML to reference our concat/min/revved script files
<script src="/js/head-scripts.js" changed to <script src="/js/d41d.head-scripts.js"
<script src="/js/script.js" changed to <script src="/js/d41d.script.js"
Update the HTML with the new css filenames
<link rel="stylesheet" href="/css/main.css" changed to <link rel="stylesheet" href="/css/d41d.main.css"
Update the HTML with the new img filenames
Update the HTML with data-main tags
Update the HTML with the data tags
Update the HTML with background imgs, case there is some inline style
Update the HTML with anchors images
Update the HTML with reference in input

Running "usemin:css" (usemin) task

Processing as CSS - dist/css/d41d.main.css
Update the CSS with new img filenames

Running "htmlmin:dist" (htmlmin) task
File dist/404.html created.
File dist/index.html created.
File dist/jekyll/update/2013/07/30/welcome-to-jekyll.html created.
File dist/jekyll/update/2013/07/30/yo-jekyllrb.html created.

Done, without errors.

Jekyll command runs before bundle install

The jekyllrb generator has worked for me in the past, but now when running yo jekyllrb for a fresh project I'm getting the error below. Is it possibly related to this change and that bundle exec jekyll is running before bundle install?

[...]
[?] Number of posts to show on the home page: all
   create .gitignore
   create .gitattributes
   create Gruntfile.js
   create package.json
   create .bowerrc
   create bower.json
   create Gemfile
   create .jshintrc
   create .csslintrc
   create .editorconfig
bundler: command not found: jekyll
Install missing gem executables with `bundle install`

fs.js:427
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '/Users/username/Sites/other/jekyll-test/.jekyll/_posts/2013-12-19-welcome-to-jekyll.markdown'
    at Object.fs.openSync (fs.js:427:18)
    at Object.fs.readFileSync (fs.js:284:15)
    at Generator.copy (/usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/actions/actions.js:102:13)
    at Generator.templates (/usr/local/lib/node_modules/generator-jekyllrb/app/index.js:394:8)
    at /usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/lib/base.js:290:20
    at /usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/node_modules/async/lib/async.js:548:21
    at /usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/node_modules/async/lib/async.js:224:13
    at iterate (/usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/node_modules/async/lib/async.js:131:13)
    at /usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/node_modules/async/lib/async.js:142:25
    at /usr/local/lib/node_modules/generator-jekyllrb/node_modules/yeoman-generator/node_modules/async/lib/async.js:226:17

_bower_components ignored folder

Hello there,

after installing a bower package I have noticed that the generated Gruntfile does not correctly ignore the _bower_components folder. grunt-watch loaded too many things throwing errors like

Running "watch" task
Waiting...Warning: EMFILE, too many open files

The solution for me was to change the pattern

'!<%= yeoman.app %>/_bower_components'

to

'!<%= yeoman.app %>/_bower_components/**'

Csslint fails default Jekyll css

I haven't modified anything and csslint is failing:

Running "csslint:report" (csslint) task
Linting .tmp/stylesheets/main.css...ERROR
[L176:C1]
Don't use IDs in selectors. Selectors should not contain IDs. (ids)
[L183:C1]
Don't use IDs in selectors. Selectors should not contain IDs. (ids)

The offending main.css:

/*****************************************************************************/
/*
/* Posts
/*
/*****************************************************************************/
/* standard */
@media -sass-debug-info{filename{}line{font-family:\00003136}}
#post pre {                        <===== line 176
  border: 1px solid #ddd;
  background-color: #eef;
  padding: 0 .4em;
}

Grunt build fails due to page:all configuration setting

This is the error:

> bundle exec jekyll build --source app --destination dist --config _config.yml,_config.build.yml --trace
Configuration file: _config.yml
Configuration file: _config.build.yml
            Source: app
       Destination: dist
      Generating... C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/generators/pagination.rb:62:in `ceil': Infinity (FloatDomainError)
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/generators/pagination.rb:62:in `calculate_pages'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/generators/pagination.rb:34:in `paginate'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/generators/pagination.rb:14:in `block in generate'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/generators/pagination.rb:13:in `each'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/generators/pagination.rb:13:in `generate'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/site.rb:220:in `block in generate'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/site.rb:219:in `each'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/site.rb:219:in `generate'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/site.rb:43:in `process'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/command.rb:18:in `process_site'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/commands/build.rb:23:in `build'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/lib/jekyll/commands/build.rb:7:in `process'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/jekyll-1.0.2/bin/jekyll:59:in `block (2 levels) in <top (required)>'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:180:in `call'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/command.rb:155:in `run'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:402:in `run_active_command'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/runner.rb:78:in `run!'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/delegates.rb:11:in `run!'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/commander-4.1.3/lib/commander/import.rb:10:in `block in <top (required)>'

I'm continuing to investigate.

Add tests!

We need tests! So badly!

Could try some unit tests, but it's probably easiest to set up some integration tests like Grunt Jekyll and Build Control.

Grunt build, disable prefix on asset files (due to problems)

Hi guys,

Just wanted to know, if there is a way to disable prefix binary on asset files. For example:

767main.css

Is there a way to disable this and just to output main.css, while still compressing everything? Only reason I ask, is because when using foundation and I insert an interchange into the image tag, problems happen. The interchange data options does not convert with the prefix, here is an example:

<img data-interchange="[img/[email protected], (retina)]" width="978" height="69" src="../img/service-logos.png" alt="">

So if i was on retina, it gets outputed as:

<img width="978" height="69" src="../img/[email protected]" alt="">

This obviously doesn't work, because its trying to find the image that doesnt exist because it hasn't been prefixed, for example the src should be:

../img/[email protected]

Is there a workaround for this or can I disable prefixes when using grunt build?

Any help will be appreciated, thanks!

Add LESS as CSS preprocessor

I usually use LESS instead of COMPASS or SASS as CSS prepocessor. It could be insteresting to add LESS to the generator.

Plugin problems

Hey guys, I'm trying to implement this plugin:

https://github.com/flatterline/jekyll-plugins

I only want the project plugin, so I've set it up the way those guys have, created a new directory called "_projects" and included a couple of .yml with correct formatting, however it doesn't seem to be working..

Is there anything I should consider for this to work?

Coffeescript not picked up on server boot

Before weighing in with an issue, I just wanted to say how much I'm enjoying using this - your work is really, really appreciated over here!

To the issue - I find that whenever i need to start the grunt server task, coffeescript files are not compiled until I force a save on any one of them again. At this point i need to refresh the browser manually too. Once that's done, everything behaves as you'd expect (compiling, auto-refreshing etc).

I've had a look but grunt is quite is a mystery to me. Happy to look deeper in a few days but wanted to flag it, esp just in case you knew exactly where to look :)

Could not find gem 'jekyll (~> 1.3.0)

Hello guys,

I really don't get the point, but, the generator seems unable to find the Jekyll gem. After I run yo jekyllrb, I get this error:

Could not find gem 'jekyll (~> 1.3.0) ruby' in the gems available on this machine. (Bundler::GemNotFound)

gem query local return Jekyll Gem and others...

I've installed Ruby 1.9.3 like this suggestion, but the problem persist.

Using:

  • OS X Mavericks
  • Last version of Node, Yeoman, and gems
  • Tried these Ruby versions
    • ruby-1.9.3-p484 [ x86_64 ]
    • ruby-2.0.0-p247 [ x86_64 ]
      *ruby-2.0.0-p353 [ x86_64 ]

Thanks!

Generator should be globally installed

It's recommended that Yeoman generators be globally installed. I've taken to having the global generator install a local version of itself to lock the version being used in a project, but that's only necessary for generators that have sub-generators you'll want to keep using.

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.