Jekyll

How can I change the default font for a Jekyll website

爱⌒轻易说出口 提交于 2020-08-22 19:10:18
问题 I'm new to using Jekyll, css, etc, and I forked the Jekyll now repo. Is there a way I can change, or add, default fonts to the entire jekyll website? It looks like this post may have some answers, but I don't really understand it. 回答1: Edit the file style.scss located at the root of the jekyll instance, you can change the font from this: body { ... font: 18px/1.4 $helvetica; } to this: body { font-family: "Times New Roman", Times, serif; } or whatever font you want. If you want to make it

我的博客园css模板美化的经验分享

纵饮孤独 提交于 2020-08-16 14:14:25
作为一个搞CS的人,如果你只是想找个地方发博客,那么博客园还是个不错的平台。虽然现在的自建博客工具多的不得了,动态的有WordPress、Ghost,静态的有hexo、jekyll等等;虽然对于一个码农而言捣鼓这些东西也算不上太难,不过终归是要浪费时间的。所以本着一切从简的原则,我也很支持从博客园这样现成的平台上写博客。 博客园的优点很多,比如支持css、支持Markdown、支持页首html代码,也支持侧边栏JS代码。缺点当然也不少,后台界面样式古板,相对于自己建站能设置的选项还是太少,而且也不支持绑定自有域名。不过总体上来说,我还是非常喜欢博客园的,这也是我所使用的第一个技术博客平台。 使用博客园是为了从简,但是博客园提供的官方模板确实不够美观。作为一个码农,在这些模板上发表技术博客,显得low了一点,对不起自己的专业,所以这里我就介绍一下我折腾博客园美化的经历。如果你觉得我的博客园设置的还算美观,按照接下来的教程一步步来,就可以做出一样的效果。 我的博客园博客: https://www.cnblogs.com/yaoyaoliu/ 首先进入博客园设置界面: 皮肤选择 ThinkInside ,然后在下面的 页面定制CSS代码 中输入如下的代码: /*主页面样式*/ html{_background-image:url(none.jpg)}body{background:

Get a blank page after pushing a site using Github pages with Jekyll

老子叫甜甜 提交于 2020-08-02 08:04:10
问题 I created a GitHub Pages site with Jekyll. Everything is fine when browsing to http://localhost:4000. Then I pushed it to GitHub, but there is nothing (blank page, no error, no content) when accessing https://USERNAME.github.io/. The content of Gemfile , source "https://rubygems.org" ruby RUBY_VERSION gem "minima", "~> 2.0" gem "github-pages", group: :jekyll_plugins group :jekyll_plugins do gem "jekyll-feed", "~> 0.6" end The structure of my repo, (why is _site not uploaded?) _posts Initial

微服务构建持久API的7大规则

丶灬走出姿态 提交于 2020-07-27 13:04:01
前言 近年来,微服务架构发展迅速,SparkPost就是早期落地微服务架构公司之一,他们发现落地微服务过程中,不光需要考虑服务发现、服务注册、服务调用跟踪链等等架构问题,也需要重视微服务API的变更管理。微服务的一大特性就是独立发布,快速迭代,但前提是足够稳定,他们在使用微服务构建API的过程中就遇到很多问题: 1. 客户(微服务使用方)经常反馈API 升级变更后不可用,有时影响范围不可控,导致该微服务上线延期,甚至线上故障,违背了微服务初衷 2. API参数变化或返回结果变化而导致客户端行为不一致,依赖客户端需要大量重构,团队不能专注在创新型工作 3. API 易用性差, 使用方技术栈不统一,各自进行API抽象及封装,容易出错 4. 缺少文档及使用引导,需要大量支持工作 5. 闭门造车,产出微服务往往不能满足需求,运行一段时间就会逐渐废弃 SparkPost经过多年的探索与实践,总结了大量最佳实践,指导他们构建持久稳定的微服务API。现如今,它们的API被成千上万的客户使用,包括Pinterest、Zillow和Intercomto,每月发送超过150亿封电子邮件。 在这篇文章中,我将回顾几个选择和最佳实践。 七大原则 一、Restful是最好的,但要实用,不需要学究式 首先,也是最重要的一步,我们采取的步骤是决定使用REST作为API

Getting an “Unknown tag”/Liquid error while using Jekyll

丶灬走出姿态 提交于 2020-07-07 07:32:14
问题 I did a bundle update for my Jekyll site, then tried to run bundle exec jekyll serve . I got the following console message: Liquid Exception: Liquid syntax error (line 8): Unknown tag 'when' in vendor/bundle/ruby/2.4.0/gems/liquid-4.0.0/lib/liquid/locales/en.yml I've tried the following: uninstall/reinstall Jekyll uninstall/reinstall Gems uninstall/reinstall Ruby install RVM do rm Gemfile.lock run bundle update Curiously, when I run rvm list , it says * ruby-2.4.1 [ x86_64 ] . Even though the

Jekyll: Include HTML partial inside Markdown file

我只是一个虾纸丫 提交于 2020-07-06 05:29:25
问题 Is there a way to include an HTML partial from a Markdown file with Jekyll? Example: File index.md : --- layout: default title: Home --- This is a [Markdown](http://daringfireball.net/projects/markdown/) file. {% include foobar.html %} File _includes/foobar.html : <ul> <li>Foo</li> <li>Bar</li> </ul> This unfortunately does not seem to work in my case. For completeness, here is the entire content of my _config.yml file: encoding: utf-8 markdown: kramdown baseurl: 回答1: A common reason the html

Jekyll: Include HTML partial inside Markdown file

别来无恙 提交于 2020-07-06 05:29:20
问题 Is there a way to include an HTML partial from a Markdown file with Jekyll? Example: File index.md : --- layout: default title: Home --- This is a [Markdown](http://daringfireball.net/projects/markdown/) file. {% include foobar.html %} File _includes/foobar.html : <ul> <li>Foo</li> <li>Bar</li> </ul> This unfortunately does not seem to work in my case. For completeness, here is the entire content of my _config.yml file: encoding: utf-8 markdown: kramdown baseurl: 回答1: A common reason the html

Jekyll: Include HTML partial inside Markdown file

坚强是说给别人听的谎言 提交于 2020-07-06 05:29:06
问题 Is there a way to include an HTML partial from a Markdown file with Jekyll? Example: File index.md : --- layout: default title: Home --- This is a [Markdown](http://daringfireball.net/projects/markdown/) file. {% include foobar.html %} File _includes/foobar.html : <ul> <li>Foo</li> <li>Bar</li> </ul> This unfortunately does not seem to work in my case. For completeness, here is the entire content of my _config.yml file: encoding: utf-8 markdown: kramdown baseurl: 回答1: A common reason the html

specifying layout for html posts in jekyll

折月煮酒 提交于 2020-06-29 11:10:51
问题 I am writing my posts in jekyll in html. I cannot seem to figure out how to specify layout fro the post. What is the html equivalent of this markdown header --- layout: post --- 回答1: You do the same thing in HTML files (and any files) to specify a layout to use. 回答2: The layout refers to the HTML templates stored under _layouts in your Jekyll directory structure. If you want to use different layouts for different types of post then you need to create multiple templates in _layouts . 来源: https