The Logging Services website is generated using JBake and Maven. The content is written in Markdown and AsciiDoc. Page layouts are written in HTML within FreeMarker template files. The HTML uses the Bootstrap framework. The website is stored in a Git repository and when you push your changes to the asf-site branch, after a short delay, the changes will go live on the website. The beginning of this page describes how to edit the root site https://logging.apache.org. Instructions for editing project specific sites like https://logging.apache.org/log4j are towards the bottom.
This page is not a tutorial. To update the website you will have to understand how JBake, Markdown and possibly HTML and Bootstrap work. Refer to the links above for documentation on those topics. You'll also need this software installed on your machine to update the website:
|-- content <-- The automatically generated website, don't edit things here!
|
|-- sources
|
|-- pom.xml <-- Maven POM file that controls the generation
|
|-- src
|
|-- main
|
|-- jbake
|
|-- assets <-- Static files to be copied into the generated website
|
|-- content <-- One markdown or asciidoc page for each page of the website
|
|-- templates <-- Freemarker templates for website HTML layout
Use Git to clone the roller-website repo, for example:
git clone https://gitbox.apache.org/repos/asf/logging-site.git
Make sure you are on the asf-staging branch:
cd logging-sitegit checkout asf-staging
Make your changes to Markdowna (.md) and FreeMarker (.ftl) files under the source directory.
Generate the website via Maven. Running mvn install will generate the website into the content directory.
cd sourcesmvn install
You can then view them in your browser by opening content/index.html. Or alternatively, run mvn jbake:inline so you can view the website locally at http://localhost:8080
Once the site looks good, commit your changes and preview them in the staging environment.
git add *
git commit -m "my wonderful changes" .git push origin asf-staging
Pushing your changes will cause the ASF website infrastructure will pick up your changes and publish them to the logging.staged.apache.org web site.
Once the changes have been verified checkout the asf-site branch and update the asf-site branch to include your changes.
git checkout asf-site git rebase asf-staging |
Publish the site
git push origin asf-site |
Prepare asf-staging for the next update
git checkout asf-staging git rebase asf-site git push origin asf-staging |
Each Logging Services Project provides its own web site in its own Git repository:
To update the site for a new sub project
Commit the changes.
git add * git commit -m "my wonderful changes" . git push origin asf-staging |
Once the changes are approved publish them on the live site
git checkout asf-site git rebase asf-staging git push origin asf-site |
Overview of how a specific release becomes the default content on https://logging.apache.org/log4j
Example of how to access older content: https://logging.apache.org/log4j/log4j-2.12.2/
In order to update HTML files the site must be generated via Maven from the logging-log4j2 then the generated html and other content copied into logging-log4j-site. Its common for individually changed HTML files to be copied into logging-log4j-site, not necessarily the entire site.