Jekyll

Cannot Build the site on the preview server

蹲街弑〆低调 提交于 2020-01-06 06:06:14
问题 I am a beginner on jekyll. I am following the documentation advice to Build the site on the preview server. Here is what a did : - install the last version of ruby $ruby -v -> ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16] $ gem --version -> 2.6.14 - Install Jekyll $gem install jekyll bundler -> Version of jekyll : jekyll-3.6.2 When I try to build the site on the preview server (bundle exec jekyll serve) there is the following error : jekyll 3.6.2 | Error: (/Users/admin

Can Jekyll serve content based on a URL parameter?

萝らか妹 提交于 2020-01-05 17:51:30
问题 I'm migrating a blog from WordPress to GitHub pages. In the logs for my site, I've noticed that there are many requests like this: GET /wp/?feed=atom This 301 redirects to the ATOM feed for the site. I'd planned to use httrack to scrape my site and migrate all the static content. But this presents a problem. Is there any way to replicate the /wp/?foo=bar redirects using Jekyll? 回答1: You can use Jekyll redirect_from plugin which is one of the rare plugin that can be used on github pages. The

Manual Install of Xcode command line tools not working

纵饮孤独 提交于 2020-01-05 12:33:48
问题 I've manually installed the Xcode command line tools from the Apple website, and I went through the install process but it doesn't seem to be working. I ran this from the terminal to see if it installed: Zach-Boyette-MacBook-Pro-2:~ zachboyette$ pkgutil --pkg-info=com.apple.pkg.CLTools_Executables package-id: com.apple.pkg.CLTools_Executables version: 5.1.0.0.1.1396320587 volume: / location: / install-time: 1398301024 groups: com.apple.FindSystemFiles.pkg-group com.apple.DevToolsBoth.pkg

How to include all files in a folder in Jekyll?

左心房为你撑大大i 提交于 2020-01-05 09:35:24
问题 In Jekyll you can include a file by doing: {% include some-folder/some-file.html %} If you add more files to the folder you have to manually add them: {% include some-folder/some-file-2.html %} {% include some-folder/some-file-3.html %} {% include some-folder/some-file-4.html %} Is there a way in Jekyll to include all files in a folder automatically? 回答1: It seems possible to have a variable name in an include (source). If this is allowed: {% include {{ page.my_variable }} %} Then also this

Filter Collection Items by page metadata

こ雲淡風輕ζ 提交于 2020-01-05 06:01:53
问题 Context I have a jekyll collection called product-categories in which each file has the following metadata in front matter: _product-categories/filename1.md --- - title - uuid --- I have a page whose front matter contains filenames from this collection (collection array selections are saved by their filenames with front matter)... page.html --- product-categories: - filename1 - filename2 --- [list of product-categories to be displayed here] Goal I want to display the title (from the

Filter Collection Items by page metadata

陌路散爱 提交于 2020-01-05 06:00:26
问题 Context I have a jekyll collection called product-categories in which each file has the following metadata in front matter: _product-categories/filename1.md --- - title - uuid --- I have a page whose front matter contains filenames from this collection (collection array selections are saved by their filenames with front matter)... page.html --- product-categories: - filename1 - filename2 --- [list of product-categories to be displayed here] Goal I want to display the title (from the

Full width header in jekyll?

白昼怎懂夜的黑 提交于 2020-01-05 04:56:10
问题 In my Jekyll site all content has specific width. As I understand this comes from /css/main.scss : $content-width: 800px; $on-palm: 600px; $on-laptop: 800px; I tried using "local" css in order to overwrite these. And it didn't worked. Also the above affects the whole content. Is there any way to make the header ( /_includes/header.html ) full width and keep the rest content with the default-centered width (inherited from above)? 回答1: In _includes/header.html , change <div class="wrapper"> for

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"}

How do I change the background color for code block in jekyll?

 ̄綄美尐妖づ 提交于 2020-01-04 05:37:52
问题 I'm playing with Jekyll, and have been able to change the background colour for my site. However, no matter which background or background-color properties I change in _syntax-highlighting.scss , I still get the same light grey background (even if I restart the jekyll server). None of the css/sass default files seem obvious to me for this, either. 回答1: _sass/base.scss and change pre, code rule : pre, code { ... background-color: #eef; } 来源: https://stackoverflow.com/questions/34422103/how-do

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. Archlinux

為{幸葍}努か 提交于 2020-01-04 05:25:13
问题 I'm trying to run jekyll locally on my laptop. I followed the guide of Github to do that, https://help.github.com/articles/using-jekyll-with-pages Unfortunaly I'm stuck when I have typed $bundle install I get the following error: Fetching gem metadata from https://rubygems.org/.........Failed to load /etc/gemrc due to permissions problem. Resolving dependencies... Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /usr/bin/ruby extconf.rb checking for main() in -lc... ***