Quick Guide to Org page

Kelvin Hu edited this page Jan 24, 2015 · 1 revision

Quick Guide for Org-page


The manual way (NOT recommended)

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

git clone https://github.com/kelvinh/org-page.it

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" . "http://melpa.milkbox.net/packages/") 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 "http://your.personal.site.com/")         ;; 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


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.

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 is 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?
  10. Want to add an avatar to the page?
    (setq op/personal-avatar "URL to an image")

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”.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.