loading
Web 中使用思源宋体

Web Notes

2017.04.09

Web 中使用思源宋体

近期,Adobe 和 Google 联合发布了思源宋体,给了我一个惊喜,终于有个可以放心使用的开源宋体了,而且字体设计得挺和我心意。

Self-host comments in Jekyll, powered by Firebase real-time database

Tutorials / Web Notes

2017.03.25

Self-host comments in Jekyll, powered by Firebase real-time database

It's convenient to set up a comment system in Jekyll site with external social comment systems like Disqus or Duoshuo (多说). However, as you all know, Disqus was blocked in China and Duoshuo is going to shutdown. It's the time to rethink about the comment system (although I didn't get too many comments →_→), simple and controllable. And it becomes true with Firebase database.

Jekyll 中使用 KaTeX

Web Notes

2017.02.08

Jekyll 中使用 KaTeX

笔记中遇到公式在所难免,使用 MathJax 可以方便地在网页中渲染这些公式,可一旦公式较多,页面加载起来就很慢,于是使用 KaTeX 加速公式渲染。

CSS 选择器笔记

Web Notes

2016.12.01

CSS 选择器笔记

CSS 选择器用于选择需要添加样式的元素,其重要性不言而喻。最近更新博客模板就不断调整 CSS 样式,好多时候就因为选择器不熟悉而不能应用样式,所以干脆好好学习总结一下常用的 CSS 选择器,也为下一步学习 jQuery 做好准备。

解决中文 hash tag 在 Firefox 中语法错误问题

Web Notes

2016.09.29

解决中文 hash tag 在 Firefox 中语法错误问题

最近重建博客模板,新加入了 scrollspy 功能,又按网上的建议,增加了 smooth scrolling。按预想,点击侧边栏目录中的锚点可以滚动到文中相应的标题位置,这在 Edge 和 Chrome 中都能很好运行,而在 Firefox 中却因为中文 hash tag 出现了语法错误。

Figure caption for images on Jekyll sites - single line with Markdown

Web Notes

2016.09.22

Figure caption for images on Jekyll sites - single line with Markdown

Markdown makes writing blog posts simple and fast, but sometimes that simplicity comes with limitations. Recently on updating this blog theme, I'm intend to include images in the post with captions, and there wasn’t a straightforward way using Markdown. While adding an img tag is very easy with Markdown, I would have to do some fiddling to inset the caption.

Using Liquid in Jekyll - Live with Demos

Web Notes

2016.08.20

Using Liquid in Jekyll - Live with Demos

Liquid is a simple templating language that Jekyll uses to process pages on your site. With Liquid you can output an modify variables, have logic statements inside your pages and loop over content.

Related posts in Jekyll using pure Liquid

Web Notes

2016.07.13

Related posts in Jekyll using pure Liquid

Jekyll features a simple “Related posts” variable per post page with "site.related_posts", which contains the 10 most recent posts in default. However, it only works perfectly when LSI (latent semantic indexing) option was enabled. The Liquid tags might be helpful here.

TRENDING