Jekyll

Jekyll/Rouge - highlighted code blocks nested

佐手、 提交于 2020-05-12 08:52:31
问题 I have switched from github pages to hosting my own site. As a result of this migration I got the syntax highlighting blocs to be nested. <div class="highlighter-rouge"> <div class="highlight"> <pre class="highlight"> <code> ... ... ... </code> </pre> </div> </div> When rendered it looks like: The style related settings in _config.yml are: kramdown: syntax_highlighter: rouge sass: style: :expanded Setting syntax_highlighter: none removes the highlighting related classes (this is just to give

What is a static site generator?

南笙酒味 提交于 2020-05-11 05:24:13
问题 After ditching Wordpress, I've been experimenting with Jekyll to create a blog. I chose it (over Ghost) to help learn the basics of web development while I blogged. Also, the free hosting on GitHub Pages is neat and free. What exactly is a static site generator (like Jekyll), and why do they exist? 回答1: From Build a Blog with Jekyll and GitHub Pages course on Treehouse: A static-site generator takes a set of templates and raw text files, runs it through a converter and renderer, then

Using filters in Liquid tags

随声附和 提交于 2020-05-10 06:57:47
问题 I'm using jekyll and Liquid to generate a static web site on github pages. I want to base some content decisions on whether the amount of content in a document has reached a specific number of works. jekyll has a liquid filter which counts the number of words which I want to use in an if tag. I've tried this: {% if page.content | number_of_words > 200 %} ... {% endif %} But it doesn't seem to work. I've also tried to assign the result to a variable and use that, and capture the output from

Jekyll site fails only when pushed to GitHub

▼魔方 西西 提交于 2020-05-09 06:55:36
问题 I am developing a new version of a static website with Jekyll that deployed via Github pages: https://devcampy.com The repository: https://github.com/gianarb/devcampy.com Locally I run it with docker, and I am not able to reproduce the issue: $ docker run --rm -p 4000:4000 -v "$PWD":/srv/jekyll jekyll/jekyll:stable jekyll serve This is the error I get via email when I push to the repository. I can't figure out why it does not work properly The page build failed for the `master` branch with

Jekyll site fails only when pushed to GitHub

天大地大妈咪最大 提交于 2020-05-09 06:55:28
问题 I am developing a new version of a static website with Jekyll that deployed via Github pages: https://devcampy.com The repository: https://github.com/gianarb/devcampy.com Locally I run it with docker, and I am not able to reproduce the issue: $ docker run --rm -p 4000:4000 -v "$PWD":/srv/jekyll jekyll/jekyll:stable jekyll serve This is the error I get via email when I push to the repository. I can't figure out why it does not work properly The page build failed for the `master` branch with

使用 jekyll + github pages 搭建个人博客

烈酒焚心 提交于 2020-05-02 10:22:23
1. 新建 github.io 项目 其实 github pages 有两个用途,大家可以在 官方网页 看到。其中一个是作为个人/组织的主页(每个账号只能有一个),另一个是作为 github 项目的项目主页(每个项目可以有一个)。 而 github pages 本身就支持 jekyll ,所以二者的结合使用非常方便。 这两种静态页面怎么生成在 https://pages.github.com/ 这里都有详细步骤。 所以现在既然我们要建的是个人博客,就是第一种用途了。 在 github 上新建一个 repo,命名为 username.github.io ,其中 username 就是你的 github 用户名。 把该项目 clone 到本地。 进入项目目录,在根目录下创建 index.html ,这个会自动作为博客的主页。 把所有的修改通过 git push 到刚刚创建的 repo。 好了,现在我们可以通过 https://username.github.io 来浏览我们的个人网站了。 2. 安装、使用 jekyll 网站跑起来了,但是里面没内容。当然我们可以自己写各个页面去丰富她。但是这样比较麻烦,弄个人博客我们主要关注的当然是写博文,而不想每次写一篇文章都要自己去排版一个页面。 jekyll 就是可以帮助我们实现只要关注写文章本身,她会帮我们自动转化成静态页面。

23-docker容器之间共享目录

a 夏天 提交于 2020-04-29 17:43:03
1、共享宿主机的目录给容器 docker run -d --name=test -v /opt/test:/usr/databases docker-test test是容器的名字,需唯一;-v表示创建一个数据卷并挂载到容器里,示例表示把宿主机的/opt/test目录挂载到容器的/usr/databases目录下;docker-test是镜像的名字 2、有时候需要共享容器的volume,则需采用其他方式来访问 1)采用–volumes-from 可以使用最小的镜像busybox来帮忙实现 1.docker run --name=storedata -v /data:/usr/data busybox true 定义一个名称为storedata的目录映射,示例表示把宿主机的/data目录挂载到容器的/usr/data目录下。其他的容器就可以采用–volumes-from来使用该目录 docker run -d --name=test1 --volumes-from storedata docker-test docker run -d --name=test2 --volumes-from storedata docker-test 2)采用ln链接的方式把不同目录挂载到同一个目录下 ln -s /data /opt/es1/ ln -s /data /opt/es2/ 示例在

使用github pages搭建个人博客

牧云@^-^@ 提交于 2020-04-22 08:16:28
一、环境准备 使用Github Pages搭建个人博客,一劳永逸,可以让我们更加专注于博客的撰写。博客的更新是通过将新建或改动的博客放在指定文件夹并推送到远程Github仓库来完成的,所以我们本地需要有Git环境,如果还没有安装Git,可以看下面的文章: 安装Git Git关联远程GitHub仓库 二、搭建博客 1、新建仓库 <img src="https://img-blog.csdnimg.cn/20190423153247380.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzI2OTA3MjUx,size_16,color_FFFFFF,t_70" width="900" /> 以 username.github.io 作为仓库名字。 2、本地克隆 本地创建文件夹,用于存放远程仓库,打开所创建的文件夹,右键选择 git bash here ,表示在当前目录打开 git bash 程序,然后执行如下命令,将刚才创建的仓库克隆到本地: git clone https://github.com/AmazingChen/amazingchen.github.io.git 如果 步骤1 中创建仓库时,没有勾选

利用GitHub Pages + jekyll快速搭建个人博客

拥有回忆 提交于 2020-04-22 06:00:57
前言 想搭建自己博客很久了(虽然搭了也不见得能产出多频繁)。 最初萌生想写自己博客的想法,想象中,是自己一行一行码出来的成品,对众多快速构建+模板式搭建不屑一顾,也是那段时间给闲的,从前后端选型、数据库敲定,到实际代码编写,越写越发现自己要弄的东西太多太多,而且,没有模板,没有原型,当初我的审美还是很欠缺的,每写一行css都是怀疑的,痛苦的,直到一年以后,我的博客还处于代码阶段,且中间好几次因为工作太忙,长时间没碰它,想法越来越弱,直至搁浅。 这段时间换了工作,昨天发版,今天闲的不行,于是这想法突然又冒出来了,网上闲逛逛,发现了这篇小白式教程,曾经对快速构建+模板式搭建不屑一顾的我,经过岁月的沉淀,现在的想法:嗯,真香! 于是,我的处女博,就贡献给这篇教程吧,也算是感谢一下老板这篇傻瓜式教程了。 博客搭建 博客搭建主要依赖于教程<a href="https://www.jianshu.com/p/e68fba58f75c" target="_blank">《利用 GitHub Pages 快速搭建个人博客》</a>,她的步骤都写得很详细,按着步骤来基本上问题不大,这里做个步骤总结: 1、最基本的,你得先有个GitHub账号 已经有账号的往下看,没有的同学点击<a href="https://github.com/" target="_blank">这里</a>去申请 2

面试问了解Linux内存管理吗?10张图给你安排的明明白白!

你离开我真会死。 提交于 2020-04-21 19:02:55
文章每周持续更新,各位的「三连」是对我最大的肯定。可以微信搜索公众号「 后端技术学堂 」第一时间阅读(一般比博客早更新一到两篇) 今天来带大家研究一下 Linux 内存管理。对于精通 CURD 的业务同学,内存管理好像离我们很远,但这个知识点虽然冷门(估计很多人学完根本就没机会用上)但绝对是基础中的基础,这就像武侠中的内功修炼,学完之后看不到立竿见影的效果,但对你日后的开发工作是大有裨益的,因为你站的更高了。 文中所有示例图都是我亲手画的,画图比码字还费时间,但是看图理解比文字更直观,需要高清示例图片的同学,文末有获取方式自取。 再功利点的说,面试的时候不经意间透露你懂这方面知识,并且能说出个一二三来,也许能让面试官对你更有兴趣,离升职加薪,走上人生巅峰又近了一步。 前提约定:本文讨论技术内容前提,操作系统环境都是 x86 架构的 32 位 Linux 系统。 虚拟地址 即使是现代操作系统中,内存依然是计算机中很宝贵的资源,看看你电脑几个T固态硬盘,再看看内存大小就知道了。为了充分利用和管理系统内存资源,Linux采用虚拟内存管理技术,利用虚拟内存技术让每个进程都有 4GB 互不干涉的虚拟地址空间。 进程初始化分配和操作的都是基于这个「虚拟地址」,只有当进程需要实际访问内存资源的时候才会建立虚拟地址和物理地址的映射,调入物理内存页。 打个不是很恰当的比方