Introduction
This document describes how to work the current NetBeans website(s) http://www.netbeans.org and http://platform.netbeans.org (and others possibly added later) into the new site being developed for the move to Apache. The new site has a specific look and feel which we would like to keep uniform. One of the rules at Apache is the site can not have a "back end server" other than 3rd party services such as discuss and mailing lists etc as this imposes things in infra which they can not afford to manage at this time, so a static site generator (SSG) will be used to allow for templates, writing, and blog style editing.
This is a pattern used by other projects at the ASF. Groovy as an example wrote their own. This document describes the site layout, how to use the SSG JBake in this context, a set of Gradle build files, and set of JSoup dependent Groovy scripts used to crop or scrape document content from existing pages to be placed into content files which get embedded in the new web site. Eventually the Groovy scripts will no longer be needed, and should go away; they are essentially tools for now.
Envisioned Generated Site Layout
As much of the current NB site directory structure layout should be used as possible. This means things such as https://netbeans.org/kb/index.html and https://netbeans.org/kb/trails/java-se.html will continue to work if folks have permalinked them. However, assets and media should be rearranged. Currently CSS and JS are scattered in nonintuitive places such as under /images_www, and the CSS is under various directories. This should be better organized into either a top down layout such as:
/images
/css
/js
or
/images
/assets
/css
/js
Or, the site should be organized more along the lines of web components. At the moment, the current site seems a mild hodgepodge albeit those more web component type things reside under sub-structures in /images_www, and could still be considered more top down. For the sake of getting the site over to Apache, it is suggested a top down approach matching either of the above can be fine, and either will require the same amount of effort for scripted replacements of the current content to get it into the needed SSG structure.
The current site structure follows the below, less the asset changes mentioned above:
TBD
New Site Plan
Converting the existing site to JBake will require a Gradle build setup, JBake configuration, a project structure, templates and layout, choices between page types and site sections, and some scripts to modify the current "content" files to match what JBake needs. This section will layout what that is. The output of these scripts, builds, templates, and content should deliver the envisioned generated site layout. This is obviously just a starting point at this time to be tweaked with other community members, but gets the SSG in place, to then be styled and beautified as needed.
TBD