From 9dbaf463d8b3aa59595fc2cf081ad546f9ffb6ce Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sat, 24 May 2008 21:54:37 +0200 Subject: [PATCH] Handle :index-title property during publishing. Patch from Manuel Hermenegildo. --- lisp/ChangeLog | 6 ++++++ lisp/org-publish.el | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 00d977716..fb5f7cf8d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2008-05-24 Carsten Dominik + + * org-publish.el (org-publish-project-alist): Fix typo in + docstring. + (org-publish-project-alist): Handle :index-title property. + 2008-05-21 Carsten Dominik * org-export-latex.el (org-export-as-latex): Make sure region diff --git a/lisp/org-publish.el b/lisp/org-publish.el index 07c30bc3d..848aeeacd 100644 --- a/lisp/org-publish.el +++ b/lisp/org-publish.el @@ -196,7 +196,7 @@ file names you don't want to be published. The :include property may be used to include extra files. Its value may be a list of filenames to include. The filenames are -considered relative to the publishing directory. +considered relative to the base directory. When both :include and :exclude properties are given values, the exclusion step happens first. @@ -586,6 +586,8 @@ Default for INDEX-FILENAME is 'index.org'." (exclude-regexp (plist-get project-plist :exclude)) (files (org-publish-get-base-files project exclude-regexp)) (index-filename (concat dir (or index-filename "index.org"))) + (index-title (or (plist-get project-plist :index-title) + (concat "Index for project " (car project)))) (index-buffer (find-buffer-visiting index-filename)) (ifn (file-name-nondirectory index-filename)) file) @@ -593,6 +595,7 @@ Default for INDEX-FILENAME is 'index.org'." (if index-buffer (kill-buffer index-buffer)) (with-temp-buffer + (insert (concat index-title "\n\n")) (while (setq file (pop files)) (let ((fn (file-name-nondirectory file))) ;; index shouldn't index itself