Jekyll

Jekyll static site generation on a subsite?

為{幸葍}努か 提交于 2020-02-02 11:43:56
问题 Is it possible to have Jekyll on a single subsection of my website hosted on GitHub? i.e. is it possible to have "example.github.io" be a regular site and "example.github.io/blog" be statically generated by Jekyll? I believe it's possible to do this by creating another GitHub repo called "blog" and having that repo managed by Jekyll. I'm wondering if it can all be done in one main "example.github.io" repo. Thanks! 回答1: Yes, it's possible. You just have to use the Exclude setting in your

Jekyll static site generation on a subsite?

泄露秘密 提交于 2020-02-02 11:43:48
问题 Is it possible to have Jekyll on a single subsection of my website hosted on GitHub? i.e. is it possible to have "example.github.io" be a regular site and "example.github.io/blog" be statically generated by Jekyll? I believe it's possible to do this by creating another GitHub repo called "blog" and having that repo managed by Jekyll. I'm wondering if it can all be done in one main "example.github.io" repo. Thanks! 回答1: Yes, it's possible. You just have to use the Exclude setting in your

在阿里云服务器上部署Jekyll博客

吃可爱长大的小学妹 提交于 2020-02-01 22:25:57
Step 0 首先买一台服务器,并且装好环境 我都是在阿里云上面买,而且我只是想挂一个个人网站,所以只需要最便宜的轻量应用服务器就好,半年只需要72块钱。(我现在想来,之前也应该买香港的服务器,因为更加便宜(大陆的要60块一月),而且不需要给服务器备案,想起我当时备案还弄了好久)。另一方面来说,大陆访问香港的服务器确实会比较慢。 安装环境主要是安装Ruby和Jekyll的环境,如果是在mac上面,还可能会报一些错。但是在一个纯净的ubuntu环境,那么安装简直太舒服,根本不可能报错。 Step 1: Installing Ruby sudo apt-get update sudo apt-get install ruby-full make gcc nodejs build-essential patch Step 2: Setting up Jekyll gem install jekyll bundler 创建一个新的博客(里面仅有一些基本信息,但是已经可以在网站上显示内容) jekyll new myblog cd myblog sudo bundle exec jekyll serve --detach --watch 第一行创建一个博客文件夹并且自动完成初始化,最后这一行中 detach 表示和终端脱离,有点像 nohup 的作用,在终端关闭的情况下继续运行

How can I build a gallery tag for Jekyll?

六眼飞鱼酱① 提交于 2020-01-25 11:33:27
问题 I would like to use a gallery tag in Jekyll like this: {% gallery columns="2" %} ../images/2013/12/image.png "This is one caption" ../images/2013/12/bli.png "Another caption" ../images/2014/01/bla.png ../images/2013/12/blup.png "The other one has no caption." {% endgallery %} which should give a gallery like this: I've tried module Jekyll class GalleryTag < Liquid::Tag def initialize(tag_name, text, tokens) super @text = text @tokens = tokens end def render(context) lines = @text.split("\n")

How to override style in imported scss file

女生的网名这么多〃 提交于 2020-01-25 06:52:15
问题 My Jekyll blog's theme has a scss file with the following syntax related style in minima.scss : .highlight { background: #fff; @extend %vertical-rhythm; .highlighter-rouge & { background: #eef; } .err { color: #a61717; background-color: #e3d2d2 } // Error // more stuff I want to override the nested .highlight -> .err style only, but I don't want to set the color and bg-color attributes to anything specific, just the default. As in, I want it as if the .err style had never been defined in the

jekyll posts not displaying/formatting correctly on github pages (rest of site is OK though)

谁都会走 提交于 2020-01-25 05:27:25
问题 I was quite happy when I finally managed to get this site online, but unfortunately the posts don't format or style correctly and I don't know what the problem is. Its located at https://github.com/skydusk/skydusk.github.io and the site is here: http://skydusk.github.io/ Can anyone tell me what i've done wrong here? config.yml ##The website title name: skydusk url: "http://skydusk.github.io" ##Markdown processor markdown: kramdown ##syntax highlighter. change it to pygments highlighter:

“ERROR — : Actor crashed! Celluloid::DeadActorError: attempted to call a dead actor” when running “jekyll watch” or “jekyll serve”

喜欢而已 提交于 2020-01-25 00:06:25
问题 When I run jekyll watch Jekyll will detect one change then will stop detecting any further changes. Upon canceling by hitting Ctrl+C, I get this output: E, [2015-07-23T15:38:41.307871 #1094] ERROR -- : Actor crashed! Celluloid::DeadActorError: attempted to call a dead actor /Library/Ruby/Gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/responses.rb:29:in value' /Library/Ruby/Gems/2.0.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:92:in value' /Library/Ruby/Gems/2.0.0/gems/celluloid-0.16.0/lib

Highlight in html issue with Jekyll/Liquid and pygments

佐手、 提交于 2020-01-24 19:41:10
问题 I'm using Jekyll with pygments and having an issue using {% highlight %} in .html posts. As you can see here, it is just printing out {% highlight %} yet on my homepage the syntax highlighting works See here: iwasasuperhero. Here is the code for the index, and the code for the post: Here I'm not really sure the issue or why it is working on the index but not the post page. Any ideas? 回答1: It seems I have figured out my problem. I was using {{ page.content }} in my post.html instead of just {{

Two versions of each blog post in Jekyll

淺唱寂寞╮ 提交于 2020-01-24 11:09:48
问题 I need two versions of each of my posts in a very simple Jekyll setup: The public facing version and a barebones version with branding specifically for embedding. I have one layout for each type: post.html post_embed.html I could accomplish this just fine by making duplicates of each post file with different layouts in the front matter, but that's obviously a terrible way to do it. There must be a simpler solution, either at the level of the command line or in the front matter? Update: This

Two versions of each blog post in Jekyll

扶醉桌前 提交于 2020-01-24 11:09:03
问题 I need two versions of each of my posts in a very simple Jekyll setup: The public facing version and a barebones version with branding specifically for embedding. I have one layout for each type: post.html post_embed.html I could accomplish this just fine by making duplicates of each post file with different layouts in the front matter, but that's obviously a terrible way to do it. There must be a simpler solution, either at the level of the command line or in the front matter? Update: This