Jekyll

Pulling from specific subfolders using {% for post in site.posts %}

我们两清 提交于 2019-12-24 01:18:43
问题 I'm currently working on my first Jekyll site. I have a page in which 2 seperate sections display previews of certain posts (a styled thumbnail). What I want is for these sections to display posts from different subfolders in _site/_posts. I have organized _posts to contain two subfolders, /lesplannen and /verslagen (lesson plans and reports), each containing a bunch of articles. My code for one of these sections is as follows (Jade formatting): {% for post in site.posts limit: 4 %} a(href="{

Unable to generate anything with Jekyll

不羁岁月 提交于 2019-12-24 01:01:46
问题 When I run Jekyll it does not generate anything. The output I see: Configuration from /home/mbsheikh/techtraits/techtraits-blog/_config.yml Auto-regenerating enabled: /home/mbsheikh/techtraits/techtraits-blog -> /home/mbsheikh/techtraits/techtraits-blog/_site [2012-06-15 23:23:03] regeneration: 118 files changed The _site directory is empty. Is there a way to debug Jekyll? I changed a couple of files and still don't see anything in _site . 回答1: Set auto=false in the _config.yml , then run

Is there a way to get the full path of the markdown post in jekyll?

给你一囗甜甜゛ 提交于 2019-12-24 00:57:22
问题 I created a blog just for my personal use. Just to organize my own notes. Unlike a proper blog where after you write the post you are usually done. I will be editing these post frequently, so in the footer I want to have the following: sublime /path/to/_posts/markdown-post.md So that I copy it and paste it in my terminal. So is there a way to get all that information dynamically. Or at least the full markdown file name (I could hard code the path myself) 回答1: {{ site.source }} will give you

How to remove unnecessary indent and break line in highlight jekyll

混江龙づ霸主 提交于 2019-12-23 23:04:46
问题 I use jekyll code highlight with gem rouge . Templates - Jekyll • Simple, blog-aware, static sites Code (index.html) --- layout: default --- <div class="container-fluid"> <div class="row"> <div class="col-sm-2" style="background-color:red;"> {% highlight ruby %} def hoge puts 'red' end {% endhighlight %} </div> <div class="col-sm-8" style="background-color:blue;"> {% highlight ruby %} def foo puts 'blue' end {% endhighlight %} </div> <div class="col-sm-2" style="background-color:yellow;"> {%

How Do I Exclude RSS (Jekyll-Feed) From Nav?

陌路散爱 提交于 2019-12-23 22:25:14
问题 There is no actual link to my rss feed from the nav, but it adds a css border on top of another border in my menu, which looks ugly. So how do I remove the feed from my nav? The jekyll-feed gem outputs an li for the feed Nav Menu <nav id="menu"> <ul class="links"> {% for page in site.pages %} {% if page.layout == "home" %} <li><a href="{{ "" | absolute_url }}">{{ page.title }}</a></li> {% endif %} {% endfor %} {% for page in site.pages %} {% if page.layout != "home" %} <li><a href="{{ page

In Jekyll, how does include_relative work with respect to layout files?

妖精的绣舞 提交于 2019-12-23 19:57:43
问题 I have a file called default.html in my layouts folder. In default.html , I want to add a relative include to test.html , which is also in my layouts folder. I add {% include_relative test.html }% in my default.html file to include test.html . However, when I do this, I get an error that says "Liquid Exception: Included file './test.html' not found in projects/[projectnmae]/layouts/default.html" I do have my layouts folder in a different location, as specified in my configuration file. Any

Using liquid tempting in CSS on Jekyll to adjust background color of divs on a per page basis

别来无恙 提交于 2019-12-23 19:53:03
问题 I'm using Jekyll and Liquid for my website. I've been completely stuck on using liquid in the CSS to compile correctly. I'm trying to use different colors for the borders of each page, and have the default set to black. I appreciate any insight y'all may have. #splash {width: 100%; height: 10%;} #splash background-color: {% if page.accent %}{{ page.accent }}{% else %}{{ black }}{% endif %} <div id= "splash"> </div> 回答1: You need to 2 rows of --- at the top of your file for it to compile

sass won't compile, file unreadable or not found

ぃ、小莉子 提交于 2019-12-23 18:45:03
问题 Conversion error: Jekyll::Converters::Sass encountered an error while converti ng 'assets/css/all.sass': File to import not found or unreadable: 1-tools/-tools-dir. on line 1 That is the error i get every time i run Jekyll and i can't seem to fix it. I've tried everything that i found on Google and still can't seem to make it work. Any idea what is wrong with the includes? My files are like this: _-tools-dir.sass @import 'bourbon/bourbon' @import 'fonts' @import 'normalize' @import 'vars' _

Jekyll plugin not working

江枫思渺然 提交于 2019-12-23 13:31:14
问题 I have developed a simple Jekyll plugin, to generate the categories pages. IT works fine on my local system but does not work on github site. Here is the source of the plugin: https://github.com/madhur/madhur.github.com/blob/master/_plugins/site_process.rb It should generate a page such as this: http://www.madhur.co.in/categories/Security.html However its not generated. Any ideas? 回答1: GitHub doesn't allow Jekyll plugins, turns out we don't want you running arbitrary code on our servers :)

Jekyll Config Multiple Files

余生长醉 提交于 2019-12-23 12:26:20
问题 As the doc mentions, we should be able to write: jekyll build --config "_config.yml, _config.en.yml" Instead, I receive: Fatal: The configuration file ' _config.en.yml' could not be found. While the file actually exists. What am I doing wrong? 回答1: It's a comma-separated list. You're separating it with a comma and a space. 回答2: Remove the space after the coma. jekyll build --config "_config.yml,_config.en.yml" 回答3: For others coming here and not finding the answer they need: It could also be