Jekyll

Auto regeneration is not working with _config.yml?

蓝咒 提交于 2020-01-04 04:24:08
问题 I installed jekyll and run it from cli: jekyll --server --auto But when I change _config.yml I can't see that my changes where applied and I have to restart server every time. I really need to restart server every time when I change _config.yml ? Or there is some workaround? 回答1: I believe you are correct; that changes to _config.yml always require restarting the server. After all, _config.yml provides options that you can override in the call to Jekyll. So it is unclear how auto should

Website not loading css files on certain page

∥☆過路亽.° 提交于 2020-01-04 02:41:10
问题 The site i am building isn't loading any css/javascript file for certain pages. The pages in question are the markdown post files. I am using Jekyll to build the site. Here is the link http://joshhornby.co.uk/ As you can see the index page works but the blog posts dont. 回答1: your href does not start with / nor is it absolute ( http:// ) so it will use a path relative to the current page. It is looking for CSS in the folder http://joshhornby.co.uk/2012/11/14/ Add / before your stylesheet/ in

How to include video tag / mp4 videos in a Jekyll blog

牧云@^-^@ 提交于 2020-01-03 16:01:28
问题 I am not looking for a way to link to Youtube. I want to refer to a self-hosted mp4 file. I already have {% audio my-file.mp3 %} working. I am looking for an equivalent {% video my-file.mp4 %} . If I use <video ... /> directly, I get an error "Liquid exception: Unknown tag 'video' in my-text.md". Edit : I think there is an existing Octopress plugin. But how do I install this / make it known to Jekyll? 回答1: To use the Octopress plugin, just save the video tag plugin in a _plugins folder. 来源:

“page build failed” when pushing a new blog post to github

对着背影说爱祢 提交于 2020-01-03 10:55:07
问题 I've got a blog hosted on github using jekyll bootstrap. It's been working for a while now, but the last new times I've tried to post a new blog page it's failed the pushed to github: The page build failed with the following error: page build failed For information on troubleshooting Jekyll see https://help.github.com/articles/using-jekyll-with-pages#troubleshooting If you have any questions please contact GitHub Support. I've tried deleting the recent posts I've added so that I'm consistent

Jekyll Wiping My Directory

自闭症网瘾萝莉.ら 提交于 2020-01-03 04:48:10
问题 I followed the instructions for Jekyll Quickstart. Whenever I make changes in my site's directory, the changes get wiped somehow. For example, I modified some of the code in index.html , only to have it return to Jekyll's default. I also created a subdirectory in _site called 'otherservices' with an index.html . That gets wiped as well. Any idea why this may be happening? I can't really use Jekyll if it keeps wiping. 回答1: Jekyll is a static website generator, each time it generates a website

GitHub Pages - How to prevent conversion of file names to *.html in links

梦想与她 提交于 2020-01-03 00:38:53
问题 I am using GitHub Pages to create a static web site. It does a great job processing links such that file1.md becomes file1.html in the rendered output: For example: [Link text](https://github.com/some-repo/some-file.md) in the Markdown source becomes this when rendered using GitHub Pages: <a href="https://github.com/some-repo/some-file.html">Link text</a> Can I override this conversion somehow and link to an actual md file? In other words, output that looks like this: <a href="http://https:/

jekyll with broken front matter, how to find the broken file?

与世无争的帅哥 提交于 2020-01-02 04:50:07
问题 When I make a syntax error in the front matter i'm getting the following error: /.../psych.rb:203:in `parse': (<unknown>): could not find expected ':' while scanning a simple key at line 6 column 1 (Psych::SyntaxError) from /.../psych.rb:203:in `parse_stream' from /.../psych.rb:151:in `parse' from .... Do you know a way to tell what file caused the problem? I know that I could probably use DTrace as follows: dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'| grep

Can I use liquid tags in css to have jekyll use a different background image on a per-page basis?

我的梦境 提交于 2020-01-02 04:08:09
问题 I'm using Jekyll and Liquid to generate a static web site on GitHub pages. I have found a template from templated.co (this one, specifically) that I am using for the page's layout. I have Jekyll delivering the content properly, but I would like to use a different background image on each page (in place of the default that's there now) by using Liquid in the CSS. I have Jekyll/Liquid recognizing the CSS by adding an empty front matter section to style.css, but I cannot get the following line

How can I install Jekyll on Ubuntu 10.04 Server?

此生再无相见时 提交于 2020-01-01 11:47:32
问题 The definitive guide to installing Jekyll seems to be https://github.com/jekyll/jekyll where it says: gem install jekyll I am getting an ERROR: could not find gem jekyll locally or in a repository regardless of whether I run that command as superuser or not. gem env Returns the following: RubyGems Environment: - RUBYGEMS VERSION: 1.2.0 - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [i486-linux] - INSTALLATION DIRECTORY: /var/lib/gems/1.8 - RUBY EXECUTABLE: /usr/bin/ruby1.8 - EXECUTABLE

Liquid: Can I get a random element from an Array?

旧城冷巷雨未停 提交于 2020-01-01 08:02:09
问题 I'm trying to pick a random element from an array -- is this possible using Liquid/Jekyll? I can create an array -- and access a given index ... but is there a way to "shuffle" the array and then select an index, and thus get a random element from the array? prefix: ["Foo", "Bar", "Baz"] --- {{ page.prefix[1] }} # outputs "Bar" 回答1: Liquid doesn't have a filter for picking a random element from an array or an integer interval. If you want Jekyll to do that, you would have to create an