In this post I will describe how was easy to use kelvinh/org-page a static-site generator(SSG) by Kelvin Hu to generate this website.

Org-page is based on Emacs, Org-mode and other requirements to work: easy to install, configure and deploy this website at Github(pages).

Installation and Configuration

Created this directory: ~/src/ which has two branches:

  1. master - destination for published files(HTML, CNAME, CSS, etc)
  2. source - contains the org files to generate the website.

I really like (use-package) in Emacs, then:

(use-package org-page
  :ensure t
  :config (progn
        (setq op/site-main-title "0x7cc")
        (setq op/site-sub-title "2008-06-18 00:00:37: [650] DEBUG: msg 5 not interesting")
        (setq op/personal-github-link "")
        (setq op/personal-google-analytics-id "XX-XXXXXXXX-X")
        (setq op/personal-avatar "")
        (setq op/repository-directory "~/src/")
        (setq op/site-domain "")
        (setq op/personal-disqus-shortname "0x7cc")
        (setq op/theme-root-directory "~/src/")
        (setq op/theme 'org-page-one-column)
        (setq op/highlight-render 'js)
        (setq op/category-config-alist
             :show-meta t
             :show-comment t
             :uri-generator op/generate-uri
             :uri-template "/blog/%t/"
             :sort-by :date     ;; how to sort the posts
             :category-index t) ;; generate category index or not
             :show-meta nil
             :show-comment nil
             :uri-generator op/generate-uri
             :uri-template "/"
             :sort-by :date
             :category-index nil)
             :show-meta nil
             :show-comment nil
             :uri-generator op/generate-uri
             :uri-template "/about/"
             :sort-by :date
             :category-index nil)))
        (bind-key "C-c M-p" 'op/do-publication-and-preview-site)))

For configuration basically I have followed the instructions at quick guide at Org-page repository. Then I created this binding:

  1. C-c M-p for op/do-publication-and-preview-site which:
    • publish your website locally via

      (httpd-serve-directory path)
    • Open it with

      (browse-url (format "http://%s:%d" system-name httpd-port)))


The default theme is mdo which looks like:


I am using my One Column theme.

Another Interesting Posts

by Lenilson Jose Dias
Written on 2016-04-08