jekyll-extensions

Jekyll plugin to handle categories doesn't work on GitHub

安稳与你 提交于 2019-12-13 00:44:40
问题 I've copied the Jekyll plugin to generate Category pages using an official source (https://github.com/recurser/jekyll-plugins) into my Github repository and it doesn't work, I keep on getting a 404 page. That said if I test on my local machine both in the Jekyll server and in the _site directory it works. Any ideas? 回答1: GitHub Pages does not support most plug-ins. They don't want anything crazy going on behind the scenes. Here's how I do categories with Github Pages. It is not wholly

Jekyll : Generating file with PDFKit in a gitlab-ci pipeline

送分小仙女□ 提交于 2019-12-12 03:39:37
问题 I'm trying to generate a static website with jekyll, including the generation of a per article pdf file. Here is my jekyll module : require 'pdfkit' module Jekyll Jekyll::Hooks.register :site, :post_write do |post| post.posts.docs.each do |post| filename = post.site.dest + post.id + ".pdf" dirname = File.dirname(filename) Dir.mkdir(dirname) unless File.exists?(dirname) kit = PDFKit.new(post.content, :page_size => 'Letter') kit.stylesheets << './css/bootstrap.min.css' kit.to_file(filename) end

Error on running Jekyll with jekyll-multiple-languages-plugin

☆樱花仙子☆ 提交于 2019-12-12 02:46:08
问题 I am trying to run Jekyll server on Windows using jekyll-multiple-languages-plugin but I keep getting this error message: C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- jekyll-multiple-languages-plugin (LoadError) from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require' from C:/Ruby200/lib/ruby/gems/2.0.0/gems/jekyll-2.0.3/lib/jekyll/plugin_manager.rb:28:in `block in require_gems' from C:/Ruby200/lib/ruby/gems

Error when running Jekyll: cannot load such file — google/api_client (LoadError)

谁都会走 提交于 2019-12-12 00:14:58
问题 I had to reinstall OS X Yosemite 10.10.5 and now I get the following error when running my Jekyll site (previously it was working fine): MacBook-Pro-Svetlana:iloveip svetlana$ jekyll serve WARN: Unresolved specs during Gem::Specification.reset: pygments.rb (~> 0.6.0) redcarpet (~> 3.1) jekyll-watch (~> 1.1) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. Configuration file: /Users/svetlana/Desktop/iloveip/_config.yml /Users/svetlana/Desktop/iloveip/_plugins

yaml front matter in a haml file

霸气de小男生 提交于 2019-12-10 14:14:15
问题 I am attempting to use the haml-jekyll-extension only I do not understand how to include yaml front matter? I have the following: --- user: hello --- !!! %html %title RudyIndustries %body %h1 Hello World! {{ page.user }} but it ends up getting compiled into the following html: user: hello <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <title>RudyIndustries</title> <body> <h1>Hello World! {{ page.user }}</h1> <

How do I monkey-patch a Jekyll extension or plugin?

旧时模样 提交于 2019-12-10 13:37:28
问题 I'd like to override a gem method (a Jekyll extension) that looks like this: File: lib/jekyll-amazon/amazon_tag.rb. module Jekyll module Amazon class AmazonTag < Liquid::Tag def detail(item) ... end end end end Liquid::Template.register_tag('amazon', Jekyll::Amazon::AmazonTag) I have placed code with the same structure in my project in the folder config/initializers/presentation.rb _plugins/presentation.rb . If I change the name of the method detail to a new name, it works, but I can't get it

Show pages under one folder in Jekyll?

我的未来我决定 提交于 2019-12-06 01:00:02
问题 I think the native way of managing pages of Jekyll, i.e. by creating .md file / folders under the root folder, is a bit messy. Thus I want to put, every page I want to show, into the folder called "pages". Additionally, I'd like these pages to have a cascaded structure: say if my folder has the structure: pages |-> parent1 |-> index.html |-> son1.html |-> son2.html |-> parent2 |-> index.html Then in the pages-listing page, it should be something like this: page listing * parent1 * son1 * son2

How to link post categories in Jekyll

跟風遠走 提交于 2019-12-05 23:55:59
I've got the following code in my index.html for Jekyll. I'm trying to find a way to link the categories associated with each post to the actual post themselves. So, if a post contains the category "travel" I want to click on a link that says "travel" which will bring me to all posts categorized as such. <ul class="post-list" style="list-style-type: none;"> {% for post in paginator.posts %} {% unless post.categories contains 'portfolio' %} <li> <h3><a href="{{ post.url }}">{{ post.title }}</a></h3> <span class="post-meta">{{ post.date | date: "%c" }}</span>   Filed In: {% unless p.categories =

Support for adding lazy load for images in Markdown

北城以北 提交于 2019-12-04 08:00:05
I'm using kramdown parser to convert markdown to html. I want to use lazy load for images without modifying original markdown syntax. I can achieve this by editing link.rb file in kramdown gems. But I don't want to follow this way. Because if anyone updating kramdown I'll lose these edits. Is there anyother way to do this without modifying original image syntax? Original Image Syntax: ![](some image link) Current Output (without above edit): <img src="some image link" alt=""/> Expected Output: <img data-src="some image link" alt=""/> You can mutate the resulting HTML using Nokogiri , this is

How to pass {% captured %} variable from a view to the layout in Jekyll/Liquid?

非 Y 不嫁゛ 提交于 2019-12-03 22:53:47
I am trying to rebuild a blog in Jekyll and I have stubled upon a simple task. Provided I have the following set of templates: default.html: {{ head }} {{ content }} frontpage.html: --- layout: default --- {% capture head %} Frontpage {% end %} {{ content }} index.html: --- layout: frontpage --- Other stuff I was expecting that {% capture head %} would pass a variable to layout. But it seems only variables from the Front Matter are actually being passed as page.variable_name . Is there a way to pass capture -d var to the layout in Jekyll? Guess I could make 2 different layouts for frontpage