diff options
author | Andy Wingo | 2008-03-02 17:14:20 +0100 |
---|---|---|
committer | Andy Wingo | 2008-03-02 17:14:20 +0100 |
commit | ea420f368041e26f010a7b49bb5781aaeda2b462 (patch) | |
tree | 74183490f9d37b03ae8500b774e6d46320101265 | |
parent | 1ec5fb27ebfc50a7e0c6cd181cd6d8d93b225368 (diff) | |
download | tekuti-ea420f368041e26f010a7b49bb5781aaeda2b462.tar.gz tekuti-ea420f368041e26f010a7b49bb5781aaeda2b462.zip |
only index tags of published posts
* tekuti/tags.scm (reindex-tags): Only index published posts.
-rw-r--r-- | tekuti/tags.scm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tekuti/tags.scm b/tekuti/tags.scm index 6df1a0b..466805c 100644 --- a/tekuti/tags.scm +++ b/tekuti/tags.scm @@ -30,6 +30,7 @@ #:use-module (tekuti config) #:use-module (tekuti post) #:use-module (tekuti git) + #:use-module ((srfi srfi-1) #:select (filter)) #:export (tag-link reindex-tags)) (define (tag-link tagname) @@ -43,10 +44,10 @@ (lambda (post) (for-each (lambda (cat) - (hash-push! hash cat (assq-ref post 'key))) + (hash-push! hash cat (post-key post))) (post-tags post))) posts) hash)) (define (reindex-tags old-index index) - (compute-tags (assq-ref index 'posts))) + (compute-tags (filter post-published? (assq-ref index 'posts)))) |