-
-
Notifications
You must be signed in to change notification settings - Fork 97
Quick Guide to Org page
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.
If you have never used emacs’ package management system before,
just add the following to your init.el
:
(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
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:
(op/do-publication)
it is recommended to execute this command via M-x
since you
will see more detailed options.
- Do you find that initializing a repository manually is too much trouble?
The
op/new-repository
command can simplify this. - Want to make starting a post with essential properties much
easier? Use the
op/new-post
command. - Already in a post buffer and just want to insert essential
properties? Use the
op/insert-options-template
command. - 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")
- 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:date
or by:mod-date
(:mod-date is last modification date)? -
:category-index
: generate an index page for this category?
-
- Want to add an avatar to the page?
(setq op/personal-avatar "URL to an image")
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
”.