This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/attic.git


The following commit(s) were added to refs/heads/main by this push:
     new 0ba8a94  Initial JSON export
0ba8a94 is described below

commit 0ba8a9463f6af0fa3c5d63f468ddb1b1a15af9c0
Author: Sebb <[email protected]>
AuthorDate: Fri Oct 3 17:11:47 2025 +0100

    Initial JSON export
---
 _plugins/project-data-plugin.rb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/_plugins/project-data-plugin.rb b/_plugins/project-data-plugin.rb
index b83c836..c3f6747 100644
--- a/_plugins/project-data-plugin.rb
+++ b/_plugins/project-data-plugin.rb
@@ -24,6 +24,9 @@
 # This plugin is set to "highest" priority so that it runs before any other
 # plugins and the projects array is therefore available to them.
 #
+
+require 'json'
+
 module ProjectDataPlugin
   class ProjectDataGenerator < Jekyll::Generator
     
@@ -32,6 +35,9 @@ module ProjectDataPlugin
     def generate(site)
       
       Jekyll.logger.info "ProjectDataPlugin: Starting processing project data"
+
+      File.write(File.join(site.dest, 'projects.json'), 
JSON.pretty_generate(site.data['projects'].sort.to_h))
+
       projects = Array.new
       
       # the projects hash is created by Jekyll from the _data/projects 
directory contents

Reply via email to