使用 Emacs org-mode 及 Jekyll 编写并搭建个人博客.
org 编写
在 Using org to Blog with Jekyll 中, 部分内容由于 Emacs 版本更新而过时了.
目录结构
site.org/
`-- org/
| `-- posts/
| | `-- 2020-02-07-using-org-to-blog-with-jekyll.org
| `-- about.org
| `-- index.org
|
`-- jekyll/
`-- _includes/
`-- _layouts/
`-- _posts/
`-- _config.yml
测试
- 安装 Jekyll 及 bundler
- 配置 gem 环境变量
echo 'gem: --user-install --bindir ~/your/local/bin/path' >> ~/.gemrc
执行
gem environment检查环境变量, 确认是否生效. - 安装 Jekyll 及 bundler
gem install jekyll bundler
- 配置 bundler
bundle config set --global bin ~/your/local/bin/path bundle config set --global path ~/.gem/ruby
执行
bundle env检查环境变量, 确认是否生效.
- 配置 gem 环境变量
- 配置并 host 本项目
cd ~/your/local/repo/path make cd jekyll && bundle exec jekyll serve
打开浏览器, 访问 http://localhost:4000 进行检查.
注: 更新 org 下内容后需要重新执行
make.