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.git
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
(require 'package) (package-initialize) (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 (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.
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.
- Do you find that initializing a repository manually is too much trouble?
op/new-repositorycommand can simplify this.
- Want to make starting a post with essential properties much
easier? Use the
- Already in a post buffer and just want to insert essential
properties? Use the
- 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")
- 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"
- Have a github account? It’s cool:
(setq op/personal-github-link "your github link")
- Want to do site traffic analytics with Google Analytics?
(setq op/personal-google-analytics-id "your google analytics id")
- 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) op/category-config-alist))
- 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
: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)
- Want to add an avatar to the page?
(setq op/personal-avatar "URL to an image")
- Do not want to publish some categories?
(setq op/category-ignore-list '("category1" "category2"))
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