Jekyll

使用hexo+GitHub搭建个人博客的心得(含教程)

拟墨画扇 提交于 2020-04-19 07:59:32
Author Email Yaoyao Liu yaoyaoliu@msn.com 前言 对于广大CS专业的学生和码农,找一个地方写博客,记录一些编程、配置环境、阅读论文的心得体会是一个很常见的习惯。当然想搭建个人博客,就需要找个靠谱的平台,主要就是以下的两种方式: 使用网站提供的博客平台,例如国内的CSDN、博客园;国外的Blogger、Wordpress 自己建站,发布到自己的服务器上,或者发布到GitHub、GitLab、Bitbucket等支持静态网页发布的git平台 针对于第一种方式,最大的特点就是省心。CSDN和博客园都支持多种编辑器,其中就包括Markdown。而且基本上不需要任何设置,注册个账号直接写文章就可以了。缺点是国内的这些平台都不支持使用自有域名,而且在海外访问速度也不快,有些平台还有广告。国外的平台,blogger支持自有域名,但是很多设置都不太好用,而WordPress很多功能是收费的。而且这两个平台好像在国内无法访问。总而言之,就是使用别人家的平台,可以改的东西就会比较少,受到的限制也很多。 所以许多人就选择了第二种方式。第二种方式也有很多选择。比如hexo、jekyll,而且WordPress也提供开源安装包可以部署在自己的服务器上。相对于自己购买服务器,我更倾向于使用GitHub、GitLab这些支持Pages服务的平台。原因很简单

解决invalid byte sequence in GBK

我与影子孤独终老i 提交于 2020-03-25 09:17:10
3 月,跳不动了?>>> 在post.html模板里面加入中文之后, jekyll server 命令直接报错。 解决办法是在运行服务器前先运行 chcp 65001 命令,即可解决。 在官方找到的解决办法 Windows users: run chcp 65001 first to change the command prompt's character encoding (code page) to UTF-8 so Jekyll runs without errors. 点赞 收藏 分享 文章举报 Alanyannick 发布了106 篇原创文章 · 获赞 495 · 访问量 142万+ 私信 关注 来源: oschina 链接: https://my.oschina.net/u/4274724/blog/3210574

Liquid dynamic filename is not accepted

拜拜、爱过 提交于 2020-03-06 03:13:54
问题 When i use {% include folder1/folder1_1/img.jpg %} it works perfectly, But when i try to generate the filename dynamically let's say : {%capture filename %} {{'folder1/folder1_1/'}}{{ images[0] }}{{ '.jpg' }}{% endcapture %} {% include {{ filename }} %} with images[0] = 'img' for example, i get the error that says : Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences ... I Don't understand why including file by providing the complete path(static

Liquid dynamic filename is not accepted

蹲街弑〆低调 提交于 2020-03-06 03:13:10
问题 When i use {% include folder1/folder1_1/img.jpg %} it works perfectly, But when i try to generate the filename dynamically let's say : {%capture filename %} {{'folder1/folder1_1/'}}{{ images[0] }}{{ '.jpg' }}{% endcapture %} {% include {{ filename }} %} with images[0] = 'img' for example, i get the error that says : Liquid Exception: Invalid syntax for include tag. File contains invalid characters or sequences ... I Don't understand why including file by providing the complete path(static

Could not find 'jekyll' (>= 0)

这一生的挚爱 提交于 2020-03-05 04:26:08
问题 Using jekyll -v returns the following: /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:308:in 'to_specs': Could not find 'jekyll' (>= 0) among 21 total gem(s) (Gem::MissingSpecError) Checked in 'GEM_PATH=/Users/myusername/.rvm/gems/ruby-2.4.2:/Users/myusername/.rvm/gems/ruby-2.4.2@global', execute 'gem env' for more information from /Library/Ruby/Site/2.0.0/rubygems/dependency.rb:320:in 'to_spec' from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_gem.rb:65:in 'gem' from /usr/local/bin

Jekyll+云服务器搭建

天大地大妈咪最大 提交于 2020-02-28 14:50:00
Jekyll+云服务器搭建 原博客地址:http://jinluzhang.site/2020/02/28/Jekyll-blog.html 博客参考自: https://cloud.tencent.com/developer/article/1453573, https://segmentfault.com/a/1190000012560959 需求 最近因为一些原因需要在自己租的云服务器上搭建Jekyll博客,由于之前都是在GitHub Pages上搭建的,其实在服务器这一块只需要 git push 上去就行了,现在多了一步如何在服务器上启动jekyll,因为看不少教程都没有说清楚这一步,所以写个博客记录一下,顺便梳理一下自己搭建博客的历程。 下面以Jekyll模板+阿里云轻量服务器CentOS7.3为例,进行说明 Jekyll+Github Pages 需要了解一下Jekyll的基础知识:http://jekyllcn.com/docs/home/ 然后需要建立一个你的仓库,命名为username.github.io即可,然后开启Github Pages功能,如图: 选一个喜欢的Jekyll模板,GitHub提供了几个,点击 Change theme 即可看到,觉得不喜欢还可以自己去找:http://jekyllthemes.org/, 选中之后去他的github仓库,

文学式编程-nbdev入门教程

亡梦爱人 提交于 2020-02-27 14:13:40
nbdev是一个使用Jupyter Notebook进行多模块软件开发的辅助工具,可以将多个Notebook组装为一个大型的软件系统,自动生成代码和文档,并能够在Notebook中进行交互运行和探索性测试。 nbdev 源码: https://github.com/fastai/nbdev nbdev 文档: https://nbdev.fast.ai/ nbdev主要完成下面的功能: 建立python开发框架和git repo版本。 在notebook中的cell中使用#export标记为输出代码区块。 使用库函数notebook2script()将#export标记的代码转化为python库*.py。 所生成的代码放在project name的目录下,可以在notebook中引用或者直接运行。 例程项目,用于nCoV分析(初级阶段): https://github.com/openthings/anti2020ncov 1、安装 nbdev已经加入 PyPI,使用下面的命令安装: pip install nbdev 对于 editable install ,使用: git clone https://github.com/fastai/nbdev pip install -e nbdev 2、快速开始 2.1 创建项目 开始自己的 project, 点击: nbdev

Github pages: Why do I need a gh-pages

偶尔善良 提交于 2020-02-26 12:10:12
问题 I have deployed a personal blog using Github pages and I see that some tutorials tell you to create a gh-pages branch. I did that, however, my changes to the website are visible only if I make changes to my master. So, I'm confused as to why I need gh-pages? Can someone please explain this. Thanks 回答1: You no longer need a gh-pages branch. GitHub now allows pages to be published from the master branch, or from a docs folder in master. 回答2: You host one website per github person or

Jekyll not generating pages in subfolders

[亡魂溺海] 提交于 2020-02-23 08:46:05
问题 I use GitHub Pages and created some pages in a sub folder. It seems to be not generating pages I created in sub folder. All other pages work fine. The directory structure is like this: / /index.html /_config.yaml /_includes /_layouts /_posts /tag /tag/personal.html /tag/videos.html The pages inside the /tag directory are not generated by Jekyll. Also, usually GitHub sends an email if Jekyll build fails, but did not, in this case. Also, if I do any other changes it works, so the build is

Jekyll搭建本地博客报错Liquid Warning

给你一囗甜甜゛ 提交于 2020-02-21 06:42:11
Jekyll搭建本地博客报错Liquid Warning Liquid Warning: Liquid syntax error ( line 61 ) : Unexpected character & in "site.duoshuo_share && site.duoshuo_username" in /_layouts/post.html Liquid Warning: Liquid syntax error ( line 159 ) : Unexpected character { in "tag[1].size > {{site.featured-condition-size}}" in /_layouts/post.html Liquid Warning: Liquid syntax error ( line 61 ) : Unexpected character & in "site.duoshuo_share && site.duoshuo_username" in /_layouts/post.html Liquid Warning: Liquid syntax error ( line 159 ) : Unexpected character { in "tag[1].size > {{site.featured-condition-size}}" in /