Jekyll

H2O theme for Jekyll

社会主义新天地 提交于 2020-02-18 18:44:49
正如我在 微博 上所说的,使用 Jekyll 半年以来一直没有令我满意的主题模板,所以开始计划自己写一套好看又好用的主题模板。设计之初就明确了极简主义,风格采用扁平化了,通过卡片式设计来进行区块分明的布局,参考了Medium的ui样式和知乎专栏的视觉风格。 H2O 源码及使用文档 → 新主题名叫”H2O”,基于Jekyll 3.0.x(使用 gem update jekyll 升级Jekyll),Markdown的代码高亮不再支持pygments转而使用rouge,咱已经默认配置了 highlighter: rouge 。用到的技术栈也很简单:引入jQuery类库,使用Sass编写样式,使用Gulp来编译Sass、合并压缩css、js,开源在 Github 上,稍作配置即可用于你的Jekyll博客上。 使用Sketch完成H2O主题的原型设计 比之前漂亮不少吧,下面聊聊H2O的新特性。 新特性 主题配色 支持两种主题配色——蓝色和粉色。 侧边栏 相比自己上一个版本的博客主题,首页增加了侧边栏,方便展示博主的个人信息和文章标签。 社交图标 使用阿里的图标管理平台 Iconfont 整理了一套 墙内外 常用的社交图标,包括微博、知乎、掘金、简书、Github等十多个网站,鼠标悬停会显示该站的主题色。 前后文导航 自定义文章封面 在Markdown的 文章头信息

Jekyll博客统计访问量,阅读量工具总结--LeanCloud,不蒜子,Valine,Google Analytics

匆匆过客 提交于 2020-02-08 10:21:40
此文首发于我的个人博客: Jekyll博客统计访问量,阅读量工具总结–LeanCloud,不蒜子,Valine,Google Analytics — zhang0peter的个人博客 我用 GitHub Pages搭建了jekyll的博客后,想要在页面上实现访问量的统计。 因为实在GitHub上搭建的静态博客,不能像WordPress一样可以操作php和数据库,自然只能借助第三方工具。 网上有个问答: html - Is that real show count view pages with use Jekyll? - Stack Overflow LeanCloud 网上有很多人推荐使用 LeanCloud 进行访问量的统计,比如说这篇文章: jekyll使用LeanCloud记录文章的访问次数 和这篇文章: 添加阅读量统计 ZFB 博客 你也可以使用基于LeanCloud进行开发的Valine: 文章阅读量统计 Valine 我本来也想用 LeanCloud 进行记录,但我在注册的时候告诉我要实名认证,输入姓名和身份证,还要支付宝授权 美味书签(北京)信息技术有限公司 读取我的认证信息和人脸照片。这我绝对不能忍,还要我的人脸照片,这是想做什么。 于是我就放弃使用LeanCloud进行访问量统计,对个人信息不在意的博主们可以使用LeanCloud。 不蒜子

Why are site variables in a Jekyll remote_theme's `_config` file not accessible?

两盒软妹~` 提交于 2020-02-06 07:49:09
问题 According to this, "Jekyll will read-in a _config.yml at the root of the theme-gem and merge its data into the site’s existing configuration data." But I've created a theme with a config that looks like this: And I'm referencing the variables like this in my theme's css: (Notice empty frontmatter and liquid tag on last line.) And the result comes out like this in the rendered site: (Notice the emptystring where my liquid tag used to be.) If I put the variables in the _config of my site rather

Could not open library 'libcurl.so.4' when running $ bundle exec jekyll serve

南楼画角 提交于 2020-02-05 04:55:45
问题 I use Jekyll to blog using GitHub pages. I have had a problem when running $ bundle exec jekyll serve or jekyll serve and the console prints: C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ffi-1.9.18-x64-mingw32/lib/ffi/library.rb:147:in `block in ffi_lib': Could not op (LoadError)libcurl': The specified module could not be found. . Could not open library 'libcurl.dll': The specified module could not be found. . Could not open library 'libcurl.so.4': The specified module could not be found. . Could

Baseurl behavior differs between localhost and github pages in Jekyll

风格不统一 提交于 2020-02-04 07:30:39
问题 I am developing a static site using Jekyll , to be deployed on github pages . I am facing issues using the baseurl in the configuration file. Here is an extract of my _config.yml : baseurl: "/blog" url: "http://remidoolaeghe.github.io" When ran locally at http://localhost:4000/blog/, everything is fine. The html pages are found, the resources (images, css, js) are loaded and applied on the pages. Once deployed on Github Pages , I would expect to have the site available at: http:/

Baseurl behavior differs between localhost and github pages in Jekyll

岁酱吖の 提交于 2020-02-04 07:29:12
问题 I am developing a static site using Jekyll , to be deployed on github pages . I am facing issues using the baseurl in the configuration file. Here is an extract of my _config.yml : baseurl: "/blog" url: "http://remidoolaeghe.github.io" When ran locally at http://localhost:4000/blog/, everything is fine. The html pages are found, the resources (images, css, js) are loaded and applied on the pages. Once deployed on Github Pages , I would expect to have the site available at: http:/

Including an image in a Jekyll post with custom size attribute

妖精的绣舞 提交于 2020-02-03 16:48:14
问题 In a Jekyll post I want to include an image I have in the address images/posters/surfaces.png . Furthermore, I want it to have a 750px width. I tried <img src={images/posters/surfaces.png} alt="Poster" style="width: 750px;"/> and <img src="images/posters/surfaces.png" alt="Poster" style="width: 750px;"/> but it did not work. What syntax should I use instead? 回答1: Relative links lead to confusion, better use absolute URLs like: {{ "images/posters/surfaces.png" | absolute_url }} Or if you won't

Including an image in a Jekyll post with custom size attribute

眉间皱痕 提交于 2020-02-03 16:45:09
问题 In a Jekyll post I want to include an image I have in the address images/posters/surfaces.png . Furthermore, I want it to have a 750px width. I tried <img src={images/posters/surfaces.png} alt="Poster" style="width: 750px;"/> and <img src="images/posters/surfaces.png" alt="Poster" style="width: 750px;"/> but it did not work. What syntax should I use instead? 回答1: Relative links lead to confusion, better use absolute URLs like: {{ "images/posters/surfaces.png" | absolute_url }} Or if you won't

Jekyll fails to serve (Ruby incompatible library version)

偶尔善良 提交于 2020-02-03 08:12:09
问题 When trying to run jekyll serve , it seems to build correctly (though with warnings that I haven't been able to resolve), but then fails to serve. jekyll build completes, but the resulting files are missing the compiled CSS. Output from jekyll serve : Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi --version 1.9.10 Ignoring curb-0.9.3 because its extensions are not built. Try: gem pristine curb --version 0.9.3 Ignoring executable-hooks-1.3.2 because its

Jekyll fails to serve (Ruby incompatible library version)

两盒软妹~` 提交于 2020-02-03 08:11:33
问题 When trying to run jekyll serve , it seems to build correctly (though with warnings that I haven't been able to resolve), but then fails to serve. jekyll build completes, but the resulting files are missing the compiled CSS. Output from jekyll serve : Ignoring ffi-1.9.10 because its extensions are not built. Try: gem pristine ffi --version 1.9.10 Ignoring curb-0.9.3 because its extensions are not built. Try: gem pristine curb --version 0.9.3 Ignoring executable-hooks-1.3.2 because its