I'm running jekyll locally on mac os x
[19:55:14#emeraldjava.github.io]$ jekyll -v
jekyll 2.5.3
but i've notice that the jekyll version that github pages runs is
2.4.0
How can i ensure i'm running against the same version locally?
If you want to be in sync with GitHub you can use the GitHub Pages Ruby Gem by following the instructions here: https://help.github.com/articles/using-jekyll-with-pages/#installing-jekyll
Related
this's a super noob question but, what exactly is "build the site" running this command:
`~/myblog $ bundle exec jekyll serve`
is this to start the server?, because I'm currently using $ jekyll serve :s
As mentioned in its Quick-start guide, this command will build the site on the preview server.
Update:
There is a difference between jekyll serve and bundle exec jekyll serve:
The Gemfile and Gemfile.lock files inform Bundler about the gem requirements in your site. If your site doesn’t have these Gemfiles, you can omit bundle exec and just run jekyll serve.
When you run bundle exec jekyll serve, Bundler uses the gems and versions as specified in Gemfile.lock to ensure your Jekyll site builds with no compatibility or dependency conflicts.
Update 2:
In simple words, "build the site" means the Bundler will use the gems and versions specified in Gemfile.lock to ensure your Jekyll site builds with no compatibility or dependency conflicts and then will run your site on the preview or local server.
The serve command is actually an extension of the build command.
i.e., when a Jekyll user runs jekyll serve or bundle exec jekyll serve, Jekyll first runs the jekyll build command internally and then starts the local server to host the generated site.
So what exactly is this build the site? Well, Jekyll being a static-site generator generates your site using the build command.
Therefore, whether you run jekyll build or jekyll serve, a default jekyll site gets built or generated into the ./_site folder. The minor difference with running the serve command being Jekyll will proceed to start a local web-server and mount the built / generated site onto the server so that you can navigate the site via http://localhost:4000
I am trying to install Jekyll on my x64 windows 10 computer. I have tried both chocolatey and the normal install but I keep getting the same SSL error:
The installation page and you tube videos no longer work to install Jekyll, so how do I get it with its new release?
you first should install Ruby and Rubygems. Afterwards you can simply install jekyll as gem:
gem install jekyll bundler jekyll-feed minima sass
Note: probably the SSL error is related to this topic:
https://github.com/rubygems/rubygems/issues/1736#issuecomment-261862935
I have many posts that I write as example.js files with the proper yaml front matter. In Jekyll 2.5.1 these get changed to example.html. My permalink in the config is /:title.html. In the latest version installed by running gem install jekyll in Ubuntu, I believe version 3.1.3, these posts get renamed to example.html.js.
Ideas?
For now I am just using version 2.5.1.
You have to replace your permalink by /:basename.html.
Recently, I upgrade my jekyll server from 2.5 to 3.0 , However, it occur a problem:
i render my page on gitpage that is very successful, but when i render it on my local jekyll server, there has a error
my every post's route is /category/YYYY/MM/DD/postName.html (The category is chinese)
At the git page it was no problem
but when i use the localhost server , when i cilck these post anchors , It show no find this html file , and redirect to the 404.html
On local anchors's href such as http://localhost:4000/%E6%8A%80%E6%9C%AF/2016/04/04/array-function.html
and on the git page the href is http://numerhero.github.io/%E6%8A%80%E6%9C%AF/2016/04/04/array-function.html
it was my gitpage address , no any problem : http://numerhero.github.io
Try this:
Install Bundler gem install bundler
Navigate to your project's root cd path/to/project
Run bundle init (will create a Gemfile)
Edit your Gemfile:
source 'https://rubygems.org'
gem 'github-pages'
Run bundle install
Run bundle update (once and awhile)
Serve Jekyll with Bundler: bundle exec jekyll serve
Done!
Your problem must be related to your local dependencies, which must be different than GitHub Pages'. With Bundler, a dependency manager, you will make sure you have github-pages and all it's dependencies installed locally.
Run bundle update once and awhile to make sure you have the last versions installed.
Read more about upgrading Jekyll 2 to 3 here:
http://blog.virtuacreative.com.br/upgrade-jekyll-2-to-3-gh-pages.html
After upgrading my web application based on Jekyll 1.4.3 to Jekyll 2.0.2, my home page does not incorporate the specified layout file.
Here are the steps to reproduce:
Download https://github.com/morea-framework/basic-template/tree/jekyll-2.0.
This is the jekyll-2.0 branch of my web application, which is a stripped down version to illustrate the problem. If you clone the repo, be sure to switch to the jekyll-2.0 branch.
gem uninstall jekyll
gem install jekyll -v '1.4.3'
This installs the version of jekyll in which the site builds correctly. For reasons not apparent to me, I ran into problems when I had both 1.4.3 and 2.0.2 installed simultaneously.
cd basic-template/master/src
jekyll serve --baseurl ''
This brings up my web application. If you now go to http://localhost:4000, you should see:
Now control-c to stop the application, and invoke:
gem uninstall jekyll
gem install jekyll
jekyll serve --baseurl ''
These three commands uninstalls Jekyll 1.4.3, installs Jekyll 2.0.2, and reruns Jekyll. Now if you refresh http://localhost:4000, you should see:
As you can see, the CSS styling is no longer present. That's because the layout specified in the Front Matter has for some reason not been included.
Can anyone tell me why my code no longer works correctly under Jekyll 2.0.2?
Your post references the post.html layout in it's front matter, which in turn references the default layout. The default layout doesn't exist in your _layouts folder:
https://github.com/morea-framework/basic-template/blob/jekyll-2.0/src/_layouts/post.html
You should always have a default layout.