Преглед изворни кода

Handle :index-title property during publishing.

Patch from Manuel Hermenegildo.
Carsten Dominik пре 17 година
родитељ
комит
9dbaf463d8
2 измењених фајлова са 10 додато и 1 уклоњено
  1. 6 0
      lisp/ChangeLog
  2. 4 1
      lisp/org-publish.el

+ 6 - 0
lisp/ChangeLog

@@ -1,3 +1,9 @@
+2008-05-24  Carsten Dominik  <dominik@science.uva.nl>
+
+	* org-publish.el (org-publish-project-alist): Fix typo in
+	docstring.
+	(org-publish-project-alist): Handle :index-title property.
+
 2008-05-21  Carsten Dominik  <dominik@science.uva.nl>
 
 	* org-export-latex.el (org-export-as-latex): Make sure region

+ 4 - 1
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