Author: sebb
Date: Thu Apr 26 21:54:00 2018
New Revision: 1830274
URL: http://svn.apache.org/viewvc?rev=1830274&view=rev
Log:
A bit of documentation
Modified:
attic/site-jekyll/README.md
attic/site-jekyll/src/_config.yml
attic/site-jekyll/src/_plugins/postwrite.rb
Modified: attic/site-jekyll/README.md
URL:
http://svn.apache.org/viewvc/attic/site-jekyll/README.md?rev=1830274&r1=1830273&r2=1830274&view=diff
==============================================================================
--- attic/site-jekyll/README.md (original)
+++ attic/site-jekyll/README.md Thu Apr 26 21:54:00 2018
@@ -3,13 +3,17 @@ Layout
docs/ - the generated site
src/ - source files used to generate the site
_data/
+ project.txt - sample JSON object and comments
projects.json - data for all retired projects
_includes/
+ footer.html - footer include
+ menu.html - include for navigation menu
project.list - template to create the project list include
_layouts/
project.html - template to process individual project pages
_plugins/
generate_projects.rb - Ruby script which processes the data file to
generate pages using the layout
+ postwrite.rb - Ruby post-processing script to generate flags and banners
scripts/
Lua scripts for use by the web server
style/
@@ -23,7 +27,7 @@ README.md - this file
Adding a new project
====================
Add a new object to src/_data/projects.json and fill in the details
-There is a sample object in src/_data/projects.txt
+There is a sample object in src/_data/project.txt
How the build works
===================
@@ -49,3 +53,6 @@ Jekyll processes each page using the dat
The Ruby script is also used to pre-process some of the raw JSON data into a
form
that is easier to use in the template. Although the templating language is
quite
powerful, it's generally easier to use Ruby to generate the variable.
+
+After the output has been written, another plugin processes thd projects data
and
+creates the flags directories and banners files.
Modified: attic/site-jekyll/src/_config.yml
URL:
http://svn.apache.org/viewvc/attic/site-jekyll/src/_config.yml?rev=1830274&r1=1830273&r2=1830274&view=diff
==============================================================================
--- attic/site-jekyll/src/_config.yml (original)
+++ attic/site-jekyll/src/_config.yml Thu Apr 26 21:54:00 2018
@@ -1,12 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
title: Apache Attic
-description: >- # this means to ignore newlines until "baseurl:"
- Apache Attic
+
+description: Apache Attic
+
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
-source: "src"
-destination: "docs"
-
# Build settings
markdown: kramdown
Modified: attic/site-jekyll/src/_plugins/postwrite.rb
URL:
http://svn.apache.org/viewvc/attic/site-jekyll/src/_plugins/postwrite.rb?rev=1830274&r1=1830273&r2=1830274&view=diff
==============================================================================
--- attic/site-jekyll/src/_plugins/postwrite.rb (original)
+++ attic/site-jekyll/src/_plugins/postwrite.rb Thu Apr 26 21:54:00 2018
@@ -2,11 +2,12 @@
# This is run after the site has been written
# Note that the dist/GHOST name is assumed to be the same as the project
+# Register this code to run in the site scope after the site has been written
Jekyll::Hooks.register :site, :post_write do |site|
site.data['projects'].each do |prj|
project = prj['project']
- if project
- unless prj['subproject']
+ if project # Not all entries correspond to a project
+ unless prj['subproject'] # we don't try to redirect dist/GHOST
subproject dirs
flagdir = File.join(site.dest, 'flags', "#{project}.apache.org")
unless Dir.exist?(flagdir)
Dir.mkdir(flagdir, 0755)