summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--org-conf.el38
1 files changed, 24 insertions, 14 deletions
diff --git a/org-conf.el b/org-conf.el
index c2afc19..604a3ea 100644
--- a/org-conf.el
+++ b/org-conf.el
@@ -804,14 +804,20 @@ project. Use such functions as `org-list-to-org' or
title
"#+HTML_LINK_UP: index.html"
(format-time-string "%F %a %R")
- (cadr (assoc title durand-sitemap-custom-string-alist #'string=))
+ (cadr
+ (assoc title durand-sitemap-custom-string-alist #'string=))
;; generate a table
- (org-list-to-generic
- rep
- '(:ustart "|---|"
- :uend "|---|"
- :isep "|---|"))
- (caddr (assoc title durand-sitemap-custom-string-alist #'string=))))
+ (replace-regexp-in-string
+ (rx-to-string '(seq "|---|" (one-or-more space) "|---|"))
+ "|---|"
+ (org-list-to-generic
+ rep
+ '(:ustart "|---|"
+ :uend "|---|"
+ :isep "|---|")))
+ (caddr
+ (assoc title durand-sitemap-custom-string-alist
+ #'string=))))
;;;;; Custom sitemap format
@@ -829,13 +835,17 @@ ENTRY is the entry file name to format.
STYLE is either 'list or 'tree, which is ignored by us.
PROJECT is the current project."
- (format "| %s | [[file:%s][%s]] |"
- (format-time-string
- "%FT%T%z"
- (org-publish-find-date entry project)
- (current-time-zone))
- entry
- (org-publish-find-title entry project)))
+ (cond
+ ;; I might want to add an "exclude-list" later if more articles
+ ;; require to be excluded from the sitemap file.
+ ((string-match-p "11bus-en" entry) "")
+ ((format "| %s | [[file:%s][%s]] |"
+ (format-time-string
+ "%FT%T%z"
+ (org-publish-find-date entry project)
+ (current-time-zone))
+ entry
+ (org-publish-find-title entry project)))))
;;;; Post-processing