I have recently found excellent Octopress & Jekyll frameworks, and I am going
to switch my homepage to octopress from wordpress (which is rather well documented).
However, I am eager to add several plugins to octopress. For example, the one that
generates bibliographies. There are several plugins for Jekyll for doing this
(for example, https://github.com/inukshuk/jekyll-scholar)
However, I was not able to make it functional for an octopress website;
I tried to follow the install instructions, and instead of jekyll plugin directory
use the octopress plugin directory; it did not work out.
Can anyone provide me with general instructions how the jekyll plugin should be installed for a simple octopress blog (an example for jekyll-scholar would be enough).
Not 100% sure, as I'm new to Octopress and Jekyll myself but here goes:
Install
$ [sudo] gem install jekyll-scholar
Usage
Create a file called ext.rb in the plugins directory of Octopress.
The contents of the ext.rb file should be
require 'jekyll/scholar'
To adjust the Jekyll-Scholar settings, use the configuration file _config.yml
Related
I don't find tutorials to develop and publish jekyll plugins or to extend jekyll functionalities.
Here is Jekyll's documentation on how to get started with Jekyll plugins https://jekyllrb.com/docs/plugins/
Lately I've gotten into Jekyll for building documentation sites and hosting them on Github Pages. I understand Github Pages has a very limited list of what is allowed plugin wise. While doing some vulnerability testing I found out the file Gemfile.lock is vulnerable to XML External Entity (XXE) Injection.
In my research I've read:
Should Gemfile.lock be included in .gitignore?
A Gem's Gemfile.lock should NOT be in source control.
Setting up your GitHub Pages site locally with Jekyll
After reading the accepted answer of:
Assuming you're not writing a rubygem, Gemfile.lock should be in your repository. It's used as a snapshot of all your required gems and their dependencies. This way bundler doesn't have to recalculate all the gem dependencies each time you deploy, etc.
but I have no control over the Jekyll site. Please correct me if I'm understanding the process but Github Pages builds the site and if the Gemfile.lock is for development of Gems and that isn't something I can control it's ok to remove the file and add to the .gitignore?
GitHub Pages doesn't look for a Gemfile.lock file nor the Gemfile itself.
All it needs is a proper config file to load gems / plugins.
I just noticed that jekyll has all it needs installed locally, but a remote-theme is fetched every time jekyll is started.
I've also seen that people proposed a cache extension which hasn't been merged yet.
So I wonder if it is possible to just clone the remote theme to a certain folder?
ok, found the solution:
most themes are available also as ruby gems. So instead of specifying a remote-theme, I add the corresponding gem to Gemfile
gem "minimal-mistakes-jekyll"
and then reference it in the _config.yml
theme: minimal-mistakes-jekyll
I am new to both Jekyll and github. I have followed the instructions here to get a blog on github using Jekyll. When I type jekyll serve from my local directory I get
D:/projects/gitblog/MyName.github.com/jekyll-bootstrap/_plugins/debug.rb:13:in `<module:Jekyll>': cannot load such file -- jekyll/post (LoadError)
Can someone help me with this? Based on some thing I have read, this might be a problem with the latest version of Jekyll, which I am using,
Try deleting the file _plugins/debug.rb and run the server again.
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.