Author: sebb Date: Thu Apr 26 01:22:01 2018 New Revision: 1830128 URL: http://svn.apache.org/viewvc?rev=1830128&view=rev Log: Generate flags directory
Added: attic/site-jekyll/src/_plugins/postwrite.rb (with props) attic/site-jekyll/src/flags/ attic/site-jekyll/src/flags/README.txt (with props) Removed: attic/site-jekyll/src/gen-flags Added: attic/site-jekyll/src/_plugins/postwrite.rb URL: http://svn.apache.org/viewvc/attic/site-jekyll/src/_plugins/postwrite.rb?rev=1830128&view=auto ============================================================================== --- attic/site-jekyll/src/_plugins/postwrite.rb (added) +++ attic/site-jekyll/src/_plugins/postwrite.rb Thu Apr 26 01:22:01 2018 @@ -0,0 +1,21 @@ +# Script to generate the flags directories +# This is run after the site has been written + +Jekyll::Hooks.register :site, :post_write do |site| + puts site.dest + site.data['projects'].each do |prj| + project = prj['project'] + if project + unless prj['subproject'] + flagdir = File.join(site.dest, 'flags', "#{project}.apache.org") + unless Dir.exist?(flagdir) + Dir.mkdir(flagdir, 0755) + end + year = prj['retired'].split(' ').last.to_i + if year >= 2018 # when the banner was invented + FileUtils.touch(File.join(flagdir,'banners')) + end + end + end + end +end \ No newline at end of file Propchange: attic/site-jekyll/src/_plugins/postwrite.rb ------------------------------------------------------------------------------ svn:eol-style = native Added: attic/site-jekyll/src/flags/README.txt URL: http://svn.apache.org/viewvc/attic/site-jekyll/src/flags/README.txt?rev=1830128&view=auto ============================================================================== --- attic/site-jekyll/src/flags/README.txt (added) +++ attic/site-jekyll/src/flags/README.txt Thu Apr 26 01:22:01 2018 @@ -0,0 +1,10 @@ +This directory contains marker directories. + +These are used to control redirects from dist/GHOST using the httpd config: + + RewriteCond "%%{}{REQUEST_URI}" "^/dist/([-a-zA-Z0-9]+)" + RewriteCond "/var/www/attic.apache.org/flagged/%1.apache.org/" -d + RewriteRule ".*" "http://attic.apache.org/projects/%1.html" [R=307,L] + +This assumes that the dist/GHOST name is the same as the generated HTML file stem. +This is currently the case for all the TLPs. \ No newline at end of file Propchange: attic/site-jekyll/src/flags/README.txt ------------------------------------------------------------------------------ svn:eol-style = native