jekyll-extensions

Github pages: Why do I need a gh-pages

偶尔善良 提交于 2020-02-26 12:10:12
问题 I have deployed a personal blog using Github pages and I see that some tutorials tell you to create a gh-pages branch. I did that, however, my changes to the website are visible only if I make changes to my master. So, I'm confused as to why I need gh-pages? Can someone please explain this. Thanks 回答1: You no longer need a gh-pages branch. GitHub now allows pages to be published from the master branch, or from a docs folder in master. 回答2: You host one website per github person or

How is the “priority” flag in Jekyll plugins supposed to work?

落花浮王杯 提交于 2020-01-05 03:46:23
问题 I am currently trying to develop a plugin for Jekyll that would help use Cloudinary for responsive images. Current source is in my Github repo, I will make it a gem later when/if it works. This plugin has two features: a Liquid tag to define Cloudinary images like {% cloudinary [preset] path/to/img.jpg [attr="value"] %} a Converter to optionnaly automate transformation of standard Markdown/Kramdown syntax for images into this Liquid tag: ![alt text](path/to/img.jpg){:caption="caption text"}

Custom Liquid tag with two parameters

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-04 21:31:24
问题 How can I write/invoke a custom Liquid Tag with two parameters? Context: Jekyll 2.1.1 I have some pages that are presented as a tab set. My page front matter is allowed to define extra tabs for some pages, like this: --- blah: blah extra-tabs: - A page: a-page.md - Another page: other-page.md --- I can solve this thanks to Iterate over hashes in Liquid Templates. But ... I have an additional constraint: when rendering a-page.md, the tab displayed should look different (<li class="active">...)

Generate file inside _site with Jekyll plugin

随声附和 提交于 2019-12-24 18:40:01
问题 I have written a Jekyll plugin, "Tags", which generates a file and returns string of links to that file. Everything is fine, but if I write that file directly into the _site folder, it is removed. If I put that file outside the _site folder, it is not generated inside _site. Where and how should I add my file so that it is available inside the _site folder? 回答1: You should use class Page for this and call methods render and write . This is an example to generate the archive page at my blog:

How to link post categories in Jekyll

我的梦境 提交于 2019-12-22 09:57:29
问题 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

Support for adding lazy load for images in Markdown

自作多情 提交于 2019-12-21 16:52:50
问题 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

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

五迷三道 提交于 2019-12-21 06:59:06
问题 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

How to get Markdown processed content in Jekyll tag plugin

青春壹個敷衍的年華 提交于 2019-12-18 12:34:08
问题 I'm working on a Jekyll tag plugin for my Octopress site to help me make a 'note' element. I just want to be able to highlight a piece of information on my blog as a side note, like this. The problem is, I can't figure out how to get the contents of this tag to be processed (i.e. Markdown or Textile). The above image is only achieved is I actually make my links with html code. Here is how it ends up turning out when I use markdown in the contents. In my post, I'm writing the contents of this

How do I configure GitHub to use non-supported Jekyll site plugins?

有些话、适合烂在心里 提交于 2019-12-17 04:24:12
问题 I just created a great gallery for my Jekyll blog which builds perfectly on my localhost:4000. However, GitHub pages doesn't support the Jekyll Gallery Generator plug-in I am using: https://github.com/ggreer/jekyll-gallery-generator I read about the alternative method of hosting Jekyll on a traditional host using FTP (uploading the _site directory) http://jekyllrb.com/docs/deployment-methods/ However, rather than reconfigure my entire site and hosting, It would be great if GitHub Pages could

Jekyll Serve not working

点点圈 提交于 2019-12-14 01:57:50
问题 I have downloaded zip of this github repo - https://github.com/mmistakes/minimal-mistakes I have installed bundler and I did bundle install , it worked perfectly. Now when I try to run jekyll serve -w , WARN: Unresolved specs during Gem::Specification.reset: jekyll-watch (~> 1.1) WARN: Clearing out unresolved specs. Please report a bug if this causes problems. Configuration file: /home/kenden/Desktop/minimal-mistakes-master/_config.yml Dependency Error: Yikes! It looks like you don't have