Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time

Quick Guide for Org-page


The manual way (NOT recommended)

To install org-page manually you should first install all dependencies listed in Once this has been completed, clone the repo:

git clone

After that, please remember to add this location to your emacs’ load-path variable so that emacs can find the package.

Through package management system (strongly recommended)

If you have never used emacs’ package management system before, just add the following to your init.el:

(require 'package)
(add-to-list 'package-archives
             '("melpa" . "") t)

Now you can install org-page using the following command:

M-x package-install org-page


The required configuration of org-page is very simple, as shown below:

(add-to-list 'load-path "path/to/org-page")                    ;; only needed if you install org-page manually
(require 'org-page)
(setq op/repository-directory "path/to/your/org/repository")   ;; the repository location
(setq op/site-domain "")         ;; your domain
;;; the configuration below you should choose one, not both
(setq op/personal-disqus-shortname "your_disqus_shortname")    ;; your disqus commenting system
(setq op/personal-duoshuo-shortname "your_duoshuo_shortname")  ;; your duoshuo commenting system
(setq op/hashover-comments t)                                   ;; activate hashover self-hosted comment system


You can re-publish all org source files, or just publish the files you modified since your last publication.

To publish all files, evaluate the following line:

(op/do-publication t nil nil t)

To publish files in your latest commit, evaluate the following line:


it is recommended to execute this command via M-x since you will see more detailed options.

Site Preview

If you’d like to preview your new post prior to publication, you can do this with


After executing this command, your site will be published to the op/site-preview-directory which defaults to ~/.op-tmp and will be served locally by simple-httpd. The op/site-preview-directory variable is customizable. Be sure to read the documentation for op/do-publication-and-preview-site for even more options.

Helpful features

  1. Do you find that initializing a repository manually is too much trouble? The op/new-repository command can simplify this.
  2. Want to make starting a post with essential properties much easier? Use the op/new-post command.
  3. Already in a post buffer and just want to insert essential properties? Use the op/insert-options-template command.
  4. Is the default slogan too ugly? Configure a better one (will be shown on each page):
    (setq op/site-main-title "your main slogan")
    (setq op/site-sub-title "your sub slogan")
  5. Is the branch you store org source files on not named “source”? It’s easy to override the default branch names:
    (setq op/repository-org-branch "your source branch name") ;; default is "source"
    (setq op/repository-html-branch "your html branch name")  ;; default is "master"
  6. Have a github account? It’s cool:
    (setq op/personal-github-link "your github link")
  7. Want to do site traffic analytics with Google Analytics?
    (setq op/personal-google-analytics-id "your google analytics id")
  8. Do you want to disable commenting for posts under certain categories? Yeah, it can be achieved:
    (setq op/category-config-alist
          (cons '("photography" ;; category name goes here
                  :show-comment nil)
  9. Are there any other items that can be configured? Yeah, there are several:
    • :show-meta: show post meta info at the bottom of post?
    • :uri-generator: the function used to generate uri for posts under that category (however, it is not recommended to customize except you are an expert)
    • :uri-template: the template used to generate uri
    • :sort-by: how to sort posts on category index page, by :date or by :mod-date (:mod-date is last modification date)?
    • :category-index: generate an index page for this category?
    • :label: displayed label for the category (default: category folder name)
  10. Want to add an avatar to the page?
    (setq op/personal-avatar "URL to an image")
  11. Do not want to publish some categories?
    (setq op/category-ignore-list '("category1" "category2"))

Other configuration

If you are looking for an option not described above, you can find a full list of configuration options by running M-x customize-group and then typing ”org-page”.