Org-page - Blog Engine

Org-page

某年某月的某一天,在github发现了一个org-page 的静态网站生成器

org-page基于Emacs org-mode发布到github pages生成静态网站文件的工具

有人问:好用吗。经过简单配置,结论:好用

测试插入图片

/assets/penguins-vim-emacs.png dog /assets/dog.png

配置

github pages

首先你要有自己的github pages 仓库

并且要新建一个空白分支叫source,这个分支下存放org文件

master 分支存放生成的网页文件。

org-page install

configuration

(setq op/repository-directory "~/Documents/github/dingmingxin.github.io" ;;本地仓库位置
	  op/repository-org-branch "source" ;;指定org文件所在分支
	  op/repository-html-branch "master" ;;指定网页文件所在分支
	  op/personal-github-link "https://github.com/dingmingxin" ;;github 连接
	  op/site-domain "http://dingmingxin.github.io/" 
	  op/site-main-title "从Hello World开始"
	  op/theme 'mdo) ;; 主题

Usage

New post

org-page 提供了一个交互式创建文章的方式

M-x op/new-post

这个过程中,会让你输入文章的文件名、选项、url、tags、keywords等参数,这样org文件的头基本就搞定了,然后你只需要往里面填写内容就可以了

Org-page new-post workflow

发布

首先在source分支下修改org文件,commit

然后 M-x -> op/do-publication t nil t t

这样source分支下的org文件就自动转换为master下的网页文件,

并且自动提交到远程分支

打开github pages就能看到新的页面了

org-page 发布流程