-(defun my-blog-publish-rss-sitemap (title list)
- "Create a simple site map, as a string.
-TITLE is the title of the site map. LIST is an internal
-representation for the files to include, as returned by
-`org-list-to-lisp'."
- (with-temp-buffer
- (message "Creating RSS index.")
- (let* ((filenames (my-blog-parse-sitemap-list list))
- (project-plist (assoc "posts" org-publish-project-alist))
- ;;(articles (my-blog-sort-article-list filenames project-plist))
- )
- (org-mode)
- (insert "#+AUTHOR: Frederik Vanrenterghem\n")
- (dolist (file filenames)
- (unless (eq (file-name-base file) "rss.org")
- (let* ((abspath (file-name-concat "/home/frederik/websites/stage.vanrenterghem.biz/source/posts" file))
- (relpath (file-relative-name abspath "/home/frederik/websites/stage.vanrenterghem.biz/source/"))
- (title (org-publish-find-title file project-plist))
- (date (format-time-string (car org-time-stamp-custom-formats) (org-publish-find-date file project-plist)))
- (rss-permalink (file-name-sans-extension relpath))
- (preview (my-blog-get-preview abspath)))
- (insert (concat "* [[file:" relpath "][" title "]]\n"))
- (org-set-property "RSS_PERMALINK" rss-permalink)
- (org-set-property "PUBDATE" date)
- (org-set-property "RSS_TITLE" title)
- (insert preview))))
- (goto-char (point-min))
- (insert "#+OPTIONS: ^:nil\n")
- (write-file "~/websites/stage.vanrenterghem.biz/source/posts/rss.org"))))
-
-