为页面自动添加二维码

前端笔记

2017.09.27

为页面自动添加二维码

很早之前我也在博客分享按钮里面添加过二维码,后来换了模板就舍弃了。这次修改这个博客主题,又尝试加回来,鼓捣鼓捣也可以扫一扫了!

简化博客部署

前端笔记

2017.09.24

简化博客部署

利用 GitLab CI 简化博客部署流程,和 GitHub Pages 加 Travis CI 的搭配一样,只需推送 git 即可部署到 Firebase。

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

Site Construction

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.

Syntax highlight with Rouge in Jekyll

Tutorials

2017.03.18

Syntax highlight with Rouge in Jekyll

By default, Jekyll 3 and above versions integrated with Rouge, a pure Ruby syntax highlighter which supports over 100 languages. Since Rouge themes are compatible with Pygments’s stylesheets, it’s nice for us to choose a favourable style.

Jekyll 中使用 KaTeX

前端笔记

2017.02.08

Jekyll 中使用 KaTeX

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

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

前端笔记

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

Site Construction

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.

Related posts in Jekyll

Site Construction

2016.07.13

Related posts in Jekyll

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