This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/groovy-website.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 83139bb allow blog posts to be removed from index (e.g. draft posts)
83139bb is described below
commit 83139bb68bc6a98c3b901d35a749ad4ffcca5f4c
Author: Paul King <[email protected]>
AuthorDate: Thu Aug 10 17:01:50 2023 +1000
allow blog posts to be removed from index (e.g. draft posts)
simply add ":draft: true" in the document header
---
site/src/site/pages/blogs.groovy | 3 +++
1 file changed, 3 insertions(+)
diff --git a/site/src/site/pages/blogs.groovy b/site/src/site/pages/blogs.groovy
index 1337d19..79bef14 100644
--- a/site/src/site/pages/blogs.groovy
+++ b/site/src/site/pages/blogs.groovy
@@ -1,6 +1,9 @@
import generator.DocUtils
def keywords = [:].withDefault{ 0 }
+list.removeAll { k, v ->
+ v.attributes.draft
+}
list.each { k, v ->
v.attributes.keywords?.split(',')*.trim().each{ keywords[it]++ }
}