Permalink
Browse files

Updated the README with an example

  • Loading branch information...
1 parent 60f2a7b commit e14e863846a148d5505c42bbefbe431afebf5634 @Idorobots Idorobots committed Aug 9, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 README.org
View
@@ -111,6 +111,27 @@
- The parent for a page can be specified using =#+PARENT=. *C-c
t* again provides completion for the page name.
+*** Using post templates
+ Custom post templates can be specified by modifying variables
+ =org2blog/wp-buffer-template= and =org2blog/wp-buffer-format-function=.
+
+ For example:
+
+ : (setq org2blog/wp-buffer-template
+ : "-----------------------
+ : #+TITLE: %s
+ : #+DATE: %s
+ : -----------------------\n")
+ :
+ : (defun my-format-function (format-string)
+ : (format format-string
+ : org2blog/wp-default-title
+ : (format-time-string "%d-%m-%Y" (current-time)))))
+ : (setq org2blog/wp-buffer-format-function 'my-format-function)
+
+ =org2blog/wp-new-entry= will now create buffers begining with a default
+ title and the current date.
+
*** Updating an existing post
To update a blog post, you can simply edit the content of the org
file and republish using ~org2blog~. The =POSTID= saved in the

0 comments on commit e14e863

Please sign in to comment.