Skip to content

Commit

Permalink
Integration with org-page ... a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
howardabrams committed Apr 14, 2014
1 parent 0a7b56d commit a9203e0
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 1 deletion.
59 changes: 59 additions & 0 deletions emacs-blog.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#+TITLE: Blogging with Emacs and org-page
#+AUTHOR: Howard
#+EMAIL: howard.abrams@gmail.com
#+DATE: 2014 Apr 13
#+TAGS: emacs blog website

After playing around with [[https://github.com/kelvinh/org-page][org-page]], I've decided to lease it for a
while. Which amounts to doing the following:

#+BEGIN_SRC elisp :tangle no
(let ((repo "~/howardism"))
(make-directory repo)
(op/new-repository repo))
#+END_SRC

Of course, we need to make sure that our [[file:~/Work/Personal/gitolite-admin/conf/gitolite.conf::repo%20website-howardism][Git server]] supports this new
repository.

#+BEGIN_SRC elisp
(when (autofeaturep 'org-page)
(require 'org-page)

(setq op/repository-directory "~/Google Drive/website-howardism")
(setq op/site-main-title "howardisms")
(setq op/site-sub-title "An aging and frustrated poet in love with the absurd, his family, and his own hubris...oh, and Lisp.")

(setq op/site-domain "http://www.howardism.org/")
(setq op/personal-github-link "https://github.org/howardabrams")

;; (setq op/theme-root-directory "~/howardism/theme") ;; ??

;;; for commenting, you can choose either disqus or duoshuo
(setq op/personal-disqus-shortname "howardabrams")
;; (setq op/personal-duoshuo-shortname "your_duoshuo_shortname")

;;; the configuration below are optional
;; (setq op/personal-google-analytics-id "your_google_analytics_id")
)
#+END_SRC

* Other Variables

Like most good Emacs packages, =org-page= has a pretty good
collection of [[https://github.com/kelvinh/org-page/blob/master/op-vars.el][customizable variables]].

* Theme

The default theme that comes with =org-page= is pretty descent, and
should be sufficient just to customize the CSS file only. However,
the =mdo= theme (see the =op/theme= variable) is pulling its
contents directly from the MELPA downloaded distribution:
=~/.emacs.d/elpa/org-page-20140330.2032/themes/mdo/=

I could create my own based on his, and then modify the
=op/template-directory= which points directly into the themes
directory.

In particular, check out the =container.mustache= file which holds
the basic layout of a page.
3 changes: 2 additions & 1 deletion emacs.org
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ brew install emacs --HEAD --cocoa --srgb
brew linkapps
#+END_SRC

Not only does this install the latest version of Emacs in
Not only does this install the latest
version of Emacs in
=/usr/local/bin/emacs=, but it also links a GUI version in
=/Application/Emacs.app=. Goody.

Expand Down
16 changes: 16 additions & 0 deletions snippets/org-mode/blog
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- mode: snippet; require-final-newline: nil -*-
# name: blog
# key: blog
# --
#+TITLE: ${1:`(replace-regexp-in-string "-" " " (capitalize (file-name-nondirectory (file-name-sans-extension (buffer-file-name)))))`}
#+AUTHOR: Howard Abrams
#+EMAIL: howard.abrams@gmail.com
#+DATE: `(format-time-string "%Y-%b-%d %a")`
#+URI: `(replace-regexp-in-string (concat (getenv "HOME") "/[^/]*/") "/" (file-name-sans-extension (buffer-file-name)))`/
#+TAGS: $2
#+KEYWORDS: $3
#+LANGUAGE: en
#+OPTIONS: H:3 num:nil toc:nil \n:nil ::t |:t ^:nil -:nil f:t *:t <:t
#+DESCRIPTION: $4

$0

0 comments on commit a9203e0

Please sign in to comment.